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


##########
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 should probably be a separate issue with a PR more focused on solving 
the problem of writing a fast hex parser.



-- 
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