HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulebytebuild-0.3.16.2Haskell2010

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.