Granary_encoding.VarintSourceVariable-length integer encoding. Uses LEB128 for unsigned, zigzag+LEB128 for signed.
encode_uint64 buf n appends the LEB128 encoding of n to buf.
decode_uint64 buf off returns (value, new_offset).
encode_int64 buf n appends the zigzag+LEB128 encoding of n to buf.