Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
word16 :: Word16 -> Builder Source #
Note: This results in a zigzag encoded number. Avro does not have unsigned types.
word32 :: Word32 -> Builder Source #
Note: This results in a zigzag encoded number. Avro does not have unsigned types.
word128 :: Word128 -> Builder Source #
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
:: 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
.