| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Bytes.Builder.Avro
Contents
Description
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.
Documentation
Note: This results in a zigzag encoded number. Avro does not have unsigned types.
Note: This results in a zigzag encoded number. Avro does not have unsigned types.
word128 :: 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
Arguments
| :: Text | First key |
| -> Builder | First value (already encoded) |
| -> Text | Second key |
| -> Builder | Second value (already encoded) |
| -> 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.