xxhash-ffi
Copyright(c) 2017 Henri Verroken
LicenseBSD3
Safe HaskellNone
LanguageHaskell2010

Data.Digest.XXHash.FFI

Description

This module provides high-level helpers for the xxHash library, see https://xxhash.com.

Synopsis

XXH3 interface

newtype XXH3 a Source #

A newtype over ByteString and Text to provide convenient access to the XXH3 hash function via Hashable type class.

Since: 0.3

Constructors

XXH3 

Fields

Instances

Instances details
Show a => Show (XXH3 a) Source # 
Instance details

Defined in Data.Digest.XXHash.FFI

Methods

showsPrec :: Int -> XXH3 a -> ShowS

show :: XXH3 a -> String

showList :: [XXH3 a] -> ShowS

Eq a => Eq (XXH3 a) Source # 
Instance details

Defined in Data.Digest.XXHash.FFI

Methods

(==) :: XXH3 a -> XXH3 a -> Bool

(/=) :: XXH3 a -> XXH3 a -> Bool

Ord a => Ord (XXH3 a) Source # 
Instance details

Defined in Data.Digest.XXHash.FFI

Methods

compare :: XXH3 a -> XXH3 a -> Ordering

(<) :: XXH3 a -> XXH3 a -> Bool

(<=) :: XXH3 a -> XXH3 a -> Bool

(>) :: XXH3 a -> XXH3 a -> Bool

(>=) :: XXH3 a -> XXH3 a -> Bool

max :: XXH3 a -> XXH3 a -> XXH3 a

min :: XXH3 a -> XXH3 a -> XXH3 a

Hashable (XXH3 ByteArray) Source # 
Instance details

Defined in Data.Digest.XXHash.FFI

Methods

hashWithSalt :: Int -> XXH3 ByteArray -> Int

hash :: XXH3 ByteArray -> Int

Hashable (XXH3 ByteString) Source # 
Instance details

Defined in Data.Digest.XXHash.FFI

Methods

hashWithSalt :: Int -> XXH3 ByteString -> Int

hash :: XXH3 ByteString -> Int

Hashable (XXH3 ByteString) Source # 
Instance details

Defined in Data.Digest.XXHash.FFI

Methods

hashWithSalt :: Int -> XXH3 ByteString -> Int

hash :: XXH3 ByteString -> Int

Hashable (XXH3 Text) Source # 
Instance details

Defined in Data.Digest.XXHash.FFI

Methods

hashWithSalt :: Int -> XXH3 Text -> Int

hash :: XXH3 Text -> Int

Hashable (XXH3 Text) Source # 
Instance details

Defined in Data.Digest.XXHash.FFI

Methods

hashWithSalt :: Int -> XXH3 Text -> Int

hash :: XXH3 Text -> Int

Deprecated interface

class XXHash t where Source #

Deprecated: Use new, XXH3-based functions instead

Class for hashable data types.

Methods

xxh32 Source #

Arguments

:: t

Data to hash

-> Word32

Seed

-> Word32

Resulting hash

Calculate the 32-bit xxHash using a given seed.

xxh64 Source #

Arguments

:: t

Data to hash

-> Word64

Seed

-> Word64

Resulting hash

Calculate the 64-bit xxHash using a given seed.

Instances

Instances details
XXHash ByteString Source # 
Instance details

Defined in Data.Digest.XXHash.FFI

Methods

xxh32 :: ByteString -> Word32 -> Word32 Source #

xxh64 :: ByteString -> Word64 -> Word64 Source #

XXHash ByteString Source # 
Instance details

Defined in Data.Digest.XXHash.FFI

Methods

xxh32 :: ByteString -> Word32 -> Word32 Source #

xxh64 :: ByteString -> Word64 -> Word64 Source #