项目作者: wltsmrz

项目描述 :
Carp bindings for murmurhash3
高级语言: C
项目地址: git://github.com/wltsmrz/carp_murmurhash3.git
创建时间: 2020-11-14T15:47:55Z
项目社区:https://github.com/wltsmrz/carp_murmurhash3

开源协议:MIT License

下载


carp_murmurhash3

Carp bindings for murmurhash3

  1. (load "https://github.com/wltsmrz/carp_murmurhash3@v0.5.0")
  2. (defn main []
  3. (let-do [bytes (String.to-bytes "whatever") seed (Uint32.from-long 90210l)]
  4. (IO.println &(Uint32.str (Murmur3.hash-32x1 &bytes seed)))
  5. ; Uint32(97406411)
  6. (IO.println &(Array.str &(Murmur3.hash-32x4 &bytes seed)))
  7. ; [Uint32(2298281217) Uint32(1543099115) Uint32(474608795) Uint32(474608795)]
  8. (IO.println &(Array.str &(Murmur3.hash-64x2 &bytes seed)))
  9. ; [Uint64(14767214306599027301) Uint64(6621516002895348310)]
  10. (IO.println &(Murmur3.hash-32x1-hex &bytes seed))
  11. ; 05ce4dcb
  12. (IO.println &(Murmur3.hash-32x4-hex &bytes seed))
  13. ; 88fcfd015bf9d2eb1c49f49b1c49f49b
  14. (IO.println &(Murmur3.hash-64x2-hex &bytes seed))
  15. ; fae6c265ccefaf2beb2442565be459b8
  16. ))