klauspost / rvarint

Reverse VarInt reading/writing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rvarint

Package rvarint implements reverse varint encoding and decoding.

The encoding is similar to varint, but the bytes are written in reverse order.

Go Reference

Usage

This allows you to read varints from the end of a buffer, which can be useful when reading from a buffer that is being filled from the end.

See GoDoc for examples.

The main difference to enconding/binary is that Uvarint and Varint will read from the end of the buffer.

This also means that appending several values will result in the values being read back in reverse order.

About

Reverse VarInt reading/writing

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Go 100.0%