Ruby wrapper for xxHash
gem install xxhash
require 'xxhash'
text = "test"
seed = 12345
XXhash.xxh32(text, seed) # => 3834992036You can use it with IO objects too:
XXhash.xxh32_stream(StringIO.new('test'), 123) # => 2758658570Note that you can also pass a chunk size as third param (it's 32 bytes by default)
- MRI 1.9.3
- rbx-19mode
Note: It doesn't work on JRuby as it uses C extension.
Version 0.2.0 is equal to r32
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
Copyright (c) 2013 Vasiliy Ermolovich. See LICENSE.txt for further details.