Skip to content

Commit

Permalink
XXH3 docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ifduyue committed Aug 1, 2020
1 parent b6da104 commit eb04bbe
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
23 changes: 21 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ the module properties ``VERSION`` AND ``XXHASH_VERSION`` respectively.
>>> import xxhash
>>> xxhash.VERSION
'1.4.4'
'2.0.0'
>>> xxhash.XXHASH_VERSION
'0.7.3'
'0.8.0'
This module is hashlib-compliant, which means you can use it in the same way as ``hashlib.md5``.

Expand Down Expand Up @@ -221,6 +221,25 @@ so we can avoid allocating XXH32/64 state on heap:
In [3]: %timeit xxhash.xxh64('xxhash').hexdigest()
416 ns ± 17.3 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each)
XXH3 hashes are available since v2.0.0 (xxHash v0.8.0), they are:

Streaming classes:

| xxh3_64
| xxh3_128
Oneshot functions:

| xxh3_64_digest(bytes, seed=0)
| xxh3_64_intdigest(bytes, seed=0)
| xxh3_64_hexdigest(bytes, seed=0)
| xxh3_128_digest(bytes, seed=0)
| xxh3_128_intdigest(bytes, seed=0)
| xxh3_128_hexdigest(bytes, seed=0)


Caveats
-------

Expand Down
2 changes: 1 addition & 1 deletion xxhash/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
XXHASH_VERSION,
)

VERSION = "1.5.0.dev1"
VERSION = "2.0.0.dev1"

__all__ = [
"xxh32",
Expand Down

0 comments on commit eb04bbe

Please sign in to comment.