Module: CityHash
- Defined in:
- lib/city_hash.rb,
lib/city_hash/version.rb
Overview
All source comments are duplicated from Google’s CityHash (1.0.2) implementation at: code.google.com/p/cityhash/
Defined Under Namespace
Modules: Internal
Constant Summary collapse
- VERSION =
"0.0.1"
Class Method Summary collapse
Class Method Details
.hash128(s, seed = nil) ⇒ Object
12 13 14 15 |
# File 'lib/city_hash.rb', line 12 def self.hash128(s, seed = nil) return CityHash::Internal.hash128(s) if seed.nil? return CityHash::Internal.hash128WithSeed(s, seed) end |
.hash64(s, seed0 = nil, seed1 = nil) ⇒ Object
6 7 8 9 10 |
# File 'lib/city_hash.rb', line 6 def self.hash64(s, seed0 = nil, seed1 = nil) return CityHash::Internal.hash64(s) if seed0.nil? return CityHash::Internal.hash64WithSeed(s, seed0) if seed1.nil? return CityHash::Internal.hash64WithSeeds(s, seed0, seed1) end |