# Functions
NewBufferWriter creates a binary stream for writing with provided buffer(append write).
NewReader reads data from binary stream.
NewSliceWriter creates a binary stream for writing with provided slice(writing start from offset 0).
PutUint16 reads 2 bytes from buf as uint16.
PutUint32 puts uint32 into buf with offset.
PutUint64 puts uint64 into buf with offset.
PutUvariantLittleEndian encodes a uint64 into buf and returns the number of bytes written.
ReadUint16 reads 2 bytes from buf as uint16.
ReadUint32 reads 4 bytes from buf as uint32.
ReadUint64 reads 8 bytes from buf as uint64.
ReadUvarint reads an encoded unsigned integer from bytes.Reader and returns it as a uint64.
UvariantSize returns the bytes-size of a uint64 uvariant encoded number.
UvarintLittleEndian decodes a uint64 from buf's tail with little endian and returns that value and the number of bytes read (> 0).
VariantSize returns the bytes-size of a int64 variant encoded number.
# Variables
ErrUnexpectedRead is raised when reading negative length.
# Structs
BufferWriter is a writer for writing data into a buffer.
Reader is a stream reader.
SliceWriter is a writer for writing data into a slice.