Skip to content

Commit

Permalink
docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
thevilledev committed Dec 2, 2024
1 parent e837598 commit d7b11a4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog for ChibiHash

## 0.2.0.0 -- 2024-12-02

* Added V2 implementation of ChibiHash - v1 still the default
* Module exports both v1 and v2, API is the same
* Added example usage to README

## 0.1.0.0 -- 2024-11-27

* First version.
Expand Down
1 change: 1 addition & 0 deletions ChibiHash.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ description: Haskell port of ChibiHash, a simple and fast 64-bit hash fu
.
* Fast 64-bit hashing
* Suitable for hash tables and hash-based data structures
* Supports both V1 and V2 implementations
.
For more information, see the article "ChibiHash: A small, fast 64-bit hash function"
at https://nrk.neocities.org/articles/chibihash
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ All credit for the algorithm goes to [N-R-K](https://github.com/N-R-K).
## Usage

```haskell
module Main where
module Main (main) where

import ChibiHash (chibihash64)
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as C8

main :: IO ()
main = do
let input = BS.pack [1,2,3,4]
let seed = 0
print $ chibihash64 input seed
let text = "Hello, ChibiHash!"
putStrLn $ "Input text: " ++ show text
putStrLn $ "Hash (seed 0): " ++ show (chibihash64 (C8.pack text) 0)
```

You may also run the example program with `cabal run`.

## Tests

Run tests with `cabal test`.
Run tests with `cabal test`. Both v1 and v2 are tested.

## License

Expand Down

0 comments on commit d7b11a4

Please sign in to comment.