Copyright | (c) 2017 Henri Verroken |
---|---|
License | BSD3 |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This module provides FFI imports to the xxHash library, see https://xxhash.com/doc/v0.8.2/ for documentation.
Synopsis
- c_xxh3_64bits_withSeed :: Ptr a -> CSize -> CULLong -> IO CULLong
- c_xxh3_64bits_withSeed_safe :: Ptr a -> CSize -> CULLong -> IO CULLong
- c_xxh64 :: Ptr a -> CSize -> CULLong -> IO CULLong
- c_xxh64_safe :: Ptr a -> CSize -> CULLong -> IO CULLong
- c_xxh32 :: Ptr a -> CSize -> CUInt -> IO CUInt
- c_xxh32_safe :: Ptr a -> CSize -> CUInt -> IO CUInt
- type XXH32State = MutableByteArray# RealWorld
- allocaXXH32State :: (XXH32State -> IO a) -> IO a
- c_xxh32_copyState :: XXH32State -> XXH32State -> IO ()
- c_xxh32_reset :: XXH32State -> CUInt -> IO ()
- c_xxh32_update :: XXH32State -> Ptr a -> CSize -> IO ()
- c_xxh32_update_safe :: XXH32State -> Ptr a -> CSize -> IO ()
- c_xxh32_digest :: XXH32State -> IO CUInt
- type XXH64State = MutableByteArray# RealWorld
- allocaXXH64State :: (XXH64State -> IO a) -> IO a
- c_xxh64_copyState :: XXH64State -> XXH64State -> IO ()
- c_xxh64_reset :: XXH64State -> CULLong -> IO ()
- c_xxh64_update :: XXH64State -> Ptr a -> CSize -> IO ()
- c_xxh64_update_safe :: XXH64State -> Ptr a -> CSize -> IO ()
- c_xxh64_digest :: XXH64State -> IO CULLong
- type XXH3State = MutableByteArray# RealWorld
- allocaXXH3State :: (XXH3State -> IO a) -> IO a
- c_xxh3_copyState :: XXH3State -> XXH3State -> IO ()
- c_xxh3_64bits_reset_withSeed :: XXH3State -> CULLong -> IO ()
- c_xxh3_64bits_update :: XXH3State -> Ptr a -> CSize -> IO ()
- c_xxh3_64bits_update_safe :: XXH3State -> Ptr a -> CSize -> IO ()
- c_xxh3_64bits_digest :: XXH3State -> IO CULLong
Direct calculation
c_xxh3_64bits_withSeed Source #
Since: 0.3
c_xxh3_64bits_withSeed_safe Source #
Same as c_xxh3_64bits_withSeed
, but using safe
modifier.
Prefer this function to hash large amounts of data in multithreaded environment.
Since: 0.3
Same as c_xxh64
, but using safe
modifier.
Prefer this function to hash large amounts of data in multithreaded environment.
Since: 0.3
Same as c_xxh32
, but using safe
modifier.
Prefer this function to hash large amounts of data in multithreaded environment.
Since: 0.3
32-bit state functions
type XXH32State = MutableByteArray# RealWorld Source #
Intermediate state for computing a XXH32 using segmentation or streams.
allocaXXH32State :: (XXH32State -> IO a) -> IO a Source #
allocaXXH32State
f
temporarily allocates a XXH32State
and passes it
to the function f
.
:: XXH32State | Destination |
-> XXH32State | Source |
-> IO () |
:: XXH32State | The state to reset |
-> CUInt | The initial seed |
-> IO () |
:: XXH32State | The state to update |
-> Ptr a |
|
-> CSize | Buffer length |
-> IO () |
:: XXH32State | The state to update |
-> Ptr a |
|
-> CSize | Buffer length |
-> IO () |
Same as c_xxh32_update
, but using safe
modifier.
Prefer this function to hash large amounts of data in multithreaded environment.
Since: 0.3
:: XXH32State | The state to digest |
-> IO CUInt | Resulting hash |
64-bit state functions
type XXH64State = MutableByteArray# RealWorld Source #
Intermediate state for computing a XXH64 using segmentation or streams.
allocaXXH64State :: (XXH64State -> IO a) -> IO a Source #
allocaXXH64State
f
temporarily allocates a XXH64State
and passes it
to the function f
.
:: XXH64State | Destination |
-> XXH64State | Source |
-> IO () |
:: XXH64State | The state to reset |
-> CULLong | The initial seed |
-> IO () |
:: XXH64State | The state to update |
-> Ptr a |
|
-> CSize | Buffer length |
-> IO () |
:: XXH64State | The state to update |
-> Ptr a |
|
-> CSize | Buffer length |
-> IO () |
Same as c_xxh64_update
, but using safe
modifier.
Prefer this function to hash large amounts of data in multithreaded environment.
Since: 0.3
:: XXH64State | The state to digest |
-> IO CULLong | Resulting hash |
XXH3 state functions
type XXH3State = MutableByteArray# RealWorld Source #
Intermediate state for computing a XXH3 using segmentation or streams.
Since: 0.3
allocaXXH3State :: (XXH3State -> IO a) -> IO a Source #
allocaXXH3State
f
temporarily allocates a XXH3State
and passes it
to the function f
.
c_xxh3_64bits_reset_withSeed Source #
Since: 0.3
Since: 0.3
c_xxh3_64bits_update_safe Source #
Same as c_xxh3_64bits_update
, but using safe
modifier.
Prefer this function to hash large amounts of data in multithreaded environment.
Since: 0.3