Module sigma_ser::zig_zag_encode[][src]

Expand description

ZigZag encoder

Functions

decode_u32

Decode a signed value previously ZigZag-encoded with encode_i32 see https://developers.google.com/protocol-buffers/docs/encoding#types

decode_u64

Decode a signed value previously ZigZag-encoded with encode_i64 see https://developers.google.com/protocol-buffers/docs/encoding#types

encode_i32

Encode a 32-bit value with ZigZag. ZigZag encodes signed integers into values that can be efficiently encoded with VLQ. (Otherwise, negative values must be sign-extended to 64 bits to be varint encoded, thus always taking 10 bytes on the wire.) see https://developers.google.com/protocol-buffers/docs/encoding#types

encode_i64

Encode a 64-bit value with ZigZag. ZigZag encodes signed integers into values that can be efficiently encoded with varint. (Otherwise, negative values must be sign-extended to 64 bits to be varint encoded, thus always taking 10 bytes on the wire.) see https://developers.google.com/protocol-buffers/docs/encoding#types