avro-0.4.5.4: Avro serialization support for Haskell

Safe HaskellSafe
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.