• Stars
    star
    139
  • Rank 262,954 (Top 6 %)
  • Language
    C
  • License
    MIT License
  • Created almost 12 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Ruby wrapper for xxHash

xxHash Build Status

Ruby wrapper for xxHash

Install

gem install xxhash

Usage

require 'xxhash'

text = "test"
seed = 12345

XXhash.xxh32(text, seed) # => 3834992036

If you do not provide a seed, it will use the default value 0.

You can use it with IO objects too:

XXhash.xxh32_stream(StringIO.new('test'), 123) # => 2758658570

You can use it with file path directly, avoiding costly ruby-related operations.

XXhash.xxh32_file(__FILE__)

Note that you can also pass a chunk size as third param (it's 32 bytes by default)

XXH64 is also supported: you can use xxh64, xxh64_stream, .xxh64_file.

Supported Ruby versions

  • MRI 2.3+
  • rbx-19mode

Note: It doesn't work on JRuby as it uses C extension.

Versioning

Version 0.5.0 is equal to 0.6.2

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Copyright

Copyright (c) 2022 Vasiliy Ermolovich. See LICENSE.txt for further details.

More Repositories

1

garlicjs-rails

Garlic.js in love with Rails Asset Pipeline
Ruby
114
star
2

jose-vs-oss

I'm here to help @josevalim fight Gihub issues
CoffeeScript
105
star
3

cityhash

Ruby wrapper for google's cityhash.
C++
94
star
4

wtf_lang

An awesome language detector
Ruby
73
star
5

dota

Ruby wrapper for Dota 2 WebAPI
Ruby
32
star
6

omniauth-stackexchange

StackExchange OAuth strategy for OmniAuth
Ruby
21
star
7

github_cloner

With github_cloner you have an easy way to clone all your projects from github
Ruby
19
star
8

ruby_kick_prologs_ass

Ruby solutions of the Ninety-Nine Prolog Problems
Ruby
13
star
9

vlcrb

Ruby wrapper for libVLC
Ruby
8
star
10

rabin-karp

Rabin-Karp implementation in Ruby
Ruby
8
star
11

timezoner

A tiny service for detecting timezones by coordinates so you don't need to be dependent on online ones.
Ruby
7
star
12

zipf_distribution

Zipf's law in Ruby
Ruby
4
star
13

imstat

Check user status in the instant messengers
Ruby
3
star
14

zurek

A VERY simple polish notation calculator
3
star
15

crc16

CRC16 in DLX assembly
Assembly
3
star
16

qbLoader

An easy way to send files to http://file.qb.by
Shell
3
star
17

whoistoblame

Who is to blame?
Ruby
3
star
18

adventofcode

Elixir
2
star
19

hash_map

An implementation in Go of search and insertion operations for a hash table with linear probing
Go
2
star
20

stackoverflair

Put your stackoverflow flair on blog or wherever you want.
Ruby
2
star
21

sublime_config

my sublime text 2 config
Python
2
star
22

rails_depot

depot project
Ruby
2
star
23

proteus_simulation

Assembly
2
star
24

rubytest

rubytest
Ruby
2
star
25

windows_calc_loves_rails

windows <3 Rails
C++
2
star
26

it_crowd

The IT Crowd characters in asm
Assembly
2
star
27

validates_presence_of_boolean

Ruby
2
star
28

nashby.github.com

blog
JavaScript
2
star
29

quotypie

Your error message quote nonsense fixer.
Ruby
1
star
30

pay_fast_example

Simple app that uses ActiveMerchant PayFast integration
Ruby
1
star
31

goodoz

Goodreads.com rating for http://oz.by
CoffeeScript
1
star