Documentation ¶
Overview ¶
Package bits provides bit reading operations and binary decoding algorithms.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ZigZag ¶
ZigZag decodes a ZigZag encoded integer and returns it.
Examples of ZigZag encoded values on the left and decoded values on the right:
0 => 0 1 => -1 2 => 1 3 => -2 4 => 2 5 => -3 6 => 3
ref: https://developers.google.com/protocol-buffers/docs/encoding
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
A Reader handles bit reading operations. It buffers bits up to the next byte boundary.
func (*Reader) Read ¶
Read reads and returns the next n bits, at most 64. It buffers bits up to the next byte boundary.
Click to show internal directories.
Click to hide internal directories.