Skip to content

sfgagnon/python-xxhash

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-xxhash

Build Status Latest Version Downloads Supported Python versions License

xxhash is a Python binding for the xxHash library by Yann Collet.

Installation

$ pip install xxhash

Synopsis

>>> import xxhash
>>> xxhash.VERSION
'0.0.1'
>>> xxhash.XXHASH_VERSION
'r35'
>>>
>>> xxhash.xxh32('a')
1426945110
>>> xxhash.xxh32('a') == xxhash.xxh32('a', 0) == xxhash.xxh32('a', seed=0)
True
>>>
>>> xxhash.xxh64('a')
15154266338359012955L
>>> xxhash.xxh64('a') == xxhash.xxh64('a', 0) == xxhash.xxh64('a', seed=0)
True
>>>
>>>
>>> x = xxhash.XXH32(seed=20140805)
>>> x.update('a')
>>> x.digest()
3923507256
>>> x.update('b')
>>> x.update('c')
>>> x.digest()
4042190321
>>>
>>> x = xxhash.XXH64(seed=20140805)
>>> x.digest()
2833816799783501320L
>>> x.update('a')
>>> x.update('b')
>>> x.update('c')
>>> x.digest()
3288515524728323397L

Copyright and License

Copyright (c) 2014 Yue Du - https://github.com/ifduyue

Licensed under BSD 2-Clause License

About

Python Binding for xxHash

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • C 78.4%
  • Python 21.6%