xxhash-ffi-0.3: Bindings and high-level helpers for xxHash
Copyright(c) 2017 Henri Verroken
LicenseBSD3
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Digest.XXHash.FFI.C

Description

This module provides FFI imports to the xxHash library, see https://xxhash.com/doc/v0.8.2/ for documentation.

Synopsis

Direct calculation

c_xxh3_64bits_withSeed Source #

Arguments

:: Ptr a

Ptr to the input buffer

-> CSize

Buffer length

-> CULLong

Seed

-> IO CULLong

Resulting hash

Since: 0.3

c_xxh3_64bits_withSeed_safe Source #

Arguments

:: Ptr a

Ptr to the input buffer

-> CSize

Buffer length

-> CULLong

Seed

-> IO CULLong

Resulting hash

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

c_xxh64 Source #

Arguments

:: Ptr a

Ptr to the input buffer

-> CSize

Buffer length

-> CULLong

Seed

-> IO CULLong

Resulting hash

c_xxh64_safe Source #

Arguments

:: Ptr a

Ptr to the input buffer

-> CSize

Buffer length

-> CULLong

Seed

-> IO CULLong

Resulting hash

Same as c_xxh64, but using safe modifier. Prefer this function to hash large amounts of data in multithreaded environment.

Since: 0.3

c_xxh32 Source #

Arguments

:: Ptr a

Ptr to the input buffer

-> CSize

Buffer length

-> CUInt

Seed

-> IO CUInt

Resulting hash

c_xxh32_safe Source #

Arguments

:: Ptr a

Ptr to the input buffer

-> CSize

Buffer length

-> CUInt

Seed

-> IO CUInt

Resulting hash

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.

c_xxh32_copyState Source #

Arguments

:: XXH32State

Destination

-> XXH32State

Source

-> IO () 

c_xxh32_reset Source #

Arguments

:: XXH32State

The state to reset

-> CUInt

The initial seed

-> IO () 

c_xxh32_update Source #

Arguments

:: XXH32State

The state to update

-> Ptr a

Ptr to the input buffer

-> CSize

Buffer length

-> IO () 

c_xxh32_update_safe Source #

Arguments

:: XXH32State

The state to update

-> Ptr a

Ptr to the input buffer

-> 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

c_xxh32_digest Source #

Arguments

:: 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.

c_xxh64_copyState Source #

Arguments

:: XXH64State

Destination

-> XXH64State

Source

-> IO () 

c_xxh64_reset Source #

Arguments

:: XXH64State

The state to reset

-> CULLong

The initial seed

-> IO () 

c_xxh64_update Source #

Arguments

:: XXH64State

The state to update

-> Ptr a

Ptr to the input buffer

-> CSize

Buffer length

-> IO () 

c_xxh64_update_safe Source #

Arguments

:: XXH64State

The state to update

-> Ptr a

Ptr to the input buffer

-> 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

c_xxh64_digest Source #

Arguments

:: 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_copyState Source #

Arguments

:: XXH3State

Destination

-> XXH3State

Source

-> IO () 

Since: 0.3

c_xxh3_64bits_reset_withSeed Source #

Arguments

:: XXH3State

The state to reset

-> CULLong

The initial seed

-> IO () 

Since: 0.3

c_xxh3_64bits_update Source #

Arguments

:: XXH3State

The state to update

-> Ptr a

Ptr to the input buffer

-> CSize

Buffer length

-> IO () 

Since: 0.3

c_xxh3_64bits_update_safe Source #

Arguments

:: XXH3State

The state to update

-> Ptr a

Ptr to the input buffer

-> CSize

Buffer length

-> IO () 

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

c_xxh3_64bits_digest Source #

Arguments

:: XXH3State

The state to digest

-> IO CULLong

Resulting hash

Since: 0.3