spaolacci / murmur3

Native MurmurHash3 Go implementation
BSD 3-Clause "New" or "Revised" License
947 stars 127 forks source link

Python mmh3 compatibility #36

Open bbengfort opened 1 year ago

bbengfort commented 1 year ago

Hello @spaolacci thank you so much for providing this murmur3 implementation and for all the work you do in open source; we've been very happy to use this library in our code bases.

I was recently investigating some compatibility issues with the output produced by this package and mmh3, a Python library we are using internally. I created an issue in the mmh3 repository: https://github.com/hajimes/mmh3/issues/46.

The author of that package responded that there is a conflict in the 128-bit byte sequence on little-endian machines that is creating the incompatibility and they provided a Go snippet for the fix:

https://gist.github.com/hajimes/b174e3cd7b0d0c14be97aa39010f2932

They reference the issue in the following snippet: https://github.com/spaolacci/murmur3/blob/master/murmur128.go#L52-L61

There is also a related Stack Overflow question: https://stackoverflow.com/questions/75921577/murmur3-hash-compatibility-between-go-and-python

The author of mmh3 has issued a compatibility notice on their README and package documentation; but I was wondering if you would be interested in my opening a PR into this repository to help resolve the compatibility issue? Let me know the best way I can assist looking into this; I'm sure you're very busy.