Class Varint

java.lang.Object
com.hiddenswitch.spellsource.util.Varint

public final class Varint extends Object
Encodes signed and unsigned values using a common variable-length scheme, found for example in Google's Protocol Buffers. It uses fewer bytes to encode smaller values, but will use slightly more bytes to encode large values.

Signed values are further encoded using so-called zig-zag encoding in order to make them "compatible" with variable-length encoding.