https://github.com/adamniederer/emacs-xxhash
Use xxhash from emacs lisp
https://github.com/adamniederer/emacs-xxhash
emacs emacs-lisp emacs-modules xxhash
Last synced: about 1 month ago
JSON representation
Use xxhash from emacs lisp
- Host: GitHub
- URL: https://github.com/adamniederer/emacs-xxhash
- Owner: AdamNiederer
- Created: 2017-05-29T06:25:05.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-29T06:25:34.000Z (over 8 years ago)
- Last Synced: 2025-03-26T20:52:15.535Z (7 months ago)
- Topics: emacs, emacs-lisp, emacs-modules, xxhash
- Language: C
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
* emacs-xxhash
Hash things really really fast, from emacs!This library is an emacs lisp wrapper around the wonderful [[https://github.com/Cyan4973/xxHash][libxxhash]].
** Setup
First, make sure your copy of emacs was compiled with the `--with-modules` flag,
and has a version greater than or equal to 25.1Then, compile the library:
#+BEGIN_SRC shell
make
cp xxh.so $EMACS_LOAD_PATH
#+END_SRCTo use the library from emacs:
#+BEGIN_SRC elisp
(require 'xxh)
(xxh-64-str "Hello, world!")
#+END_SRC
** Functions
- ~(xxh-64 vec)~ - Return a hex string of representing the 64-bit hash of
~vec~. ~vec~ must be a vector, and each value in the vector must be a number
less than 255 (if it's not, all bits higher than 8 are ignored)
- ~(xxh-64-str str)~ - Return a hex string representing the 64-bit hash of
~vec~. ~vec~ must be a string.
- ~(xxh-32 vec)~ - Return a hex string of representing the 32-bit hash of
~vec~. ~vec~ must be a vector, and each value in the vector must be a number
less than 255 (if it's not, all bits higher than 8 are ignored)
- ~(xxh-32-str str)~ - Return a hex string representing the 32-bit hash of
~vec~. ~vec~ must be a string.
** License
GPLv3+