bkietz commented on code in PR #37792:
URL: https://github.com/apache/arrow/pull/37792#discussion_r1337797292


##########
cpp/src/arrow/util/string.cc:
##########
@@ -90,6 +90,16 @@ Status ParseHexValue(const char* data, uint8_t* out) {
   return Status::OK();
 }
 
+Status ParseHexValues(std::string_view hex_string, uint8_t* out) {
+  if (hex_string.size() % 2 != 0) {
+    return Status::Invalid("Expected base16 hex string");
+  }
+  for (size_t j = 0; j < hex_string.size() / 2; ++j) {
+    RETURN_NOT_OK(ParseHexValue(hex_string.data() + j * 2, out + j));

Review Comment:
   This was pretty straightforward so I just added faster hex parsing.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to