Module avro.codec.zigzag

Methods for encoding and decoding integer values using zig-zag and variable-length coding.

Variable-length coding is far more effective with negative numbers when used on zig-zag encoded values.

See Also

- [zig-zag coding](https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types) - [variable-length coding](https://lucene.apache.org/core/3_5_0/fileformats.html#VInt)

Functions

NameDescription
decodeZigzagInt(input) Perform zig-zag decoding for a 32-bit int.
decodeZigzagLong(input) Perform zig-zag decoding for a 64-bit long.
encodeInt(input, output) Encodes an int into a variable number of bytes in a given buffer.
encodeLong(input, output) Encodes a long into a variable number of bytes in a given buffer.
encodeZigzagInt(input) Perform zig-zag encoding for a 32-bit int.
encodeZigzagLong(input) Perform zig-zag encoding for a 64-bit long.