Closed jcornaz closed 5 years ago
Hi @jcornaz - I coded this library using the C++ generated hashes and confirmed that they were the same. It has been quite a long time and I would need some time to debug this issue. My bad on noticing it this late.
@jcornaz
I just added MurmurGuavaTest to test the same. The hash generated are same, its the endian-ness of the result that makes it look different.
I will probably add a converter to make it equivalent to Guava. I also checked the code in C and Java have different endian-ness.
The hash generated are same, its the endian-ness of the result that makes it look different.
Ok, make sense.
Thanks for your investigation ;-)
I let you decide if you want to close this issue or rename it.
@jcornaz
The long hash is the same when computed in value (as long
) between both Guava and Murmur. I have added documentation on how to convert long
to byte[]
in both big-endian
and little-endian
format (refer 56545af0a465aa0e57a39175f541150d1ef40d28).
Hello,
My understanding is that
Murmur3.hash_x64_128
(of this project) should return the same result (in bytes) asHasing.murmur3_128().hashBytes
(of guava library).But It doesn't. May I ask if it is expected to be different and why?
Here is my code, just in case I made an obvious mistake you could point out. (the code is written Kotlin, but should be easily understandable)