avro-0.6.0.0: Avro serialization support for Haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Avro.Codec

Synopsis

Documentation

data Codec Source #

A Codec allows for compression/decompression of a block in an Avro container according to the Avro spec.

Constructors

Codec 

Fields

  • codecName :: ByteString

    The name of the codec according to the Avro spec.

  • codecDecompress :: forall a. Decompress a

    Execute a Get over a chunk of bytes possibly decompressing the chunk incrementally.

    The API is somewhat more complex than say codecCompress to allow interleaving of decompression and binary decoding while still allowing proper error handling without resorting to async exceptions.

  • codecCompress :: ByteString -> ByteString

    Compresses a lazy stream of bytes.

type Decompress a = ByteString -> Get a -> Either String a Source #

Block decompression function for blocks of Avro.

deflateCodec :: Codec Source #

deflateCodec specifies deflate codec required by Avro spec. (see https://avro.apache.org/docs/1.8.1/spec.html#deflate)