datasketches-cpp
Loading...
Searching...
No Matches
array_of_strings_key_hasher Class Reference

Feeds strings to XXHash64 as UTF-16LE code units, which is how Java hashes a String with XxHash.hashCharArr(s.toCharArray(), ...). More...

#include <array_of_strings_sketch_impl.hpp>

Detailed Description

Feeds strings to XXHash64 as UTF-16LE code units, which is how Java hashes a String with XxHash.hashCharArr(s.toCharArray(), ...).

The input is decoded from UTF-8. Malformed input is replaced with U+FFFD exactly as Java's UTF-8 decoder (new String(bytes, StandardCharsets.UTF_8)) does it: one U+FFFD for the longest valid prefix of a malformed sequence (at least one byte), and one U+FFFD for a complete 3-byte sequence that encodes a surrogate.


The documentation for this class was generated from the following file: