HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulebytebuild-0.3.17.0Haskell2010

Data.Bytes.Builder.Avro

Builders for encoding data with Apache Avro. Most functions in this module are just aliases for other functions. Avro uses zig-zag LEB128 for all integral types.

  • 10 values
valueword16 :: Word16 -> Builder
#

Note: This results in a zigzag encoded number. Avro does not have unsigned types.

valueword32 :: Word32 -> Builder
#

Note: This results in a zigzag encoded number. Avro does not have unsigned types.

valueword128 :: Word128 -> Builder
#

Note: This results in a fixed encoded value of length 16. In the schema, the type must be {"type": "fixed", "name": "...", "size": 16}. A big-endian encoding is used.

Maps

1 declaration
valuemap2
  1. :: Text

    First key

  2. -> Builder

    First value (already encoded)

  3. -> Text

    Second key

  4. -> Builder

    Second value (already encoded)

  5. -> Builder
#

Encode a map with exactly two key-value pairs. The keys are text. This is commonly used to encode the header in an avro file, which has a map with two keys: avro.schema and avro.codec.