-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | a simple and fast 64-bit hash function -- -- Haskell port of ChibiHash, a simple and fast 64-bit hash function. -- -- Features: -- -- -- -- For more information, see the article "ChibiHash: A small, fast 64-bit -- hash function" at https://nrk.neocities.org/articles/chibihash @package ChibiHash @version 0.2.0.0 -- | V1 implementation of ChibiHash -- -- This is a 64-bit non-cryptographic hash function optimized for: -- -- module ChibiHash.V1 -- | Main hash function that processes input in several stages: 1. Process -- full 32-byte blocks 2. Process remaining bytes (< 32 bytes) 3. -- Apply final mixing function chibihash64 :: ByteString -> Word64 -> Word64 -- | V2 implementation of ChibiHash -- -- This is a 64-bit non-cryptographic hash function optimized for: - Fast -- performance on short strings - Good distribution of hash values - -- Simple implementation with no lookup tables -- -- Version 2 improvements over V1, from the original C implementation: -- -- module ChibiHash.V2 -- | Main hash function for V2 Takes a ByteString input and 64-bit seed -- value Returns a 64-bit hash value chibihash64 :: ByteString -> Word64 -> Word64 -- | ChibiHash is a simple and fast 64-bit hash function suitable for hash -- tables and hash-based data structures. This module provides both V1 -- and V2 implementations. -- -- Example usage: -- --
--   import ChibiHash (chibihash64)  -- Uses V1 by default
--   import qualified ChibiHash.V2 as V2
--   
--   main :: IO ()
--   main = do
--       let input = BS.pack [1,2,3,4]
--       let seed = 0
--       print $ chibihash64 input seed        -- V1 hash
--       print $ V2.chibihash64 input seed     -- V2 hash
--   
module ChibiHash -- | Hash a ByteString with the default (V1) implementation chibihash64 :: ByteString -> Word64 -> Word64 -- | Hash a ByteString with the V1 implementation chibihash64V1 :: ByteString -> Word64 -> Word64 -- | Hash a ByteString with the V2 implementation chibihash64V2 :: ByteString -> Word64 -> Word64