Documentation
¶
Overview ¶
Package binaryext provides functions that supplement the golang encoding/binary library. In particular, while encoding/binary provides varint encoding, binaryext provides binary encoding of straight integers, providing twice the efficiency since all 8 bits in a byte are available for use (rather than 7 with varint).
Index ¶
- Variables
- func Int16(buf []byte) (int16, error)
- func Int32(buf []byte) (int32, error)
- func Int64(buf []byte) (int64, error)
- func Int8(buf []byte) (int8, error)
- func PutInt16(x int16) []byte
- func PutInt32(x int32) []byte
- func PutInt64(x int64) []byte
- func PutInt8(x int8) []byte
- func PutUint16(x uint16) []byte
- func PutUint32(x uint32) []byte
- func PutUint64(x uint64) []byte
- func PutUint8(x uint8) []byte
- func Uint16(buf []byte) (uint16, error)
- func Uint32(buf []byte) (uint32, error)
- func Uint64(buf []byte) (uint64, error)
- func Uint8(buf []byte) (uint8, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrOverflow occurs when more bytes are provided than can // be handled by the receiving type. ErrOverflow = errors.NewInvalidArgumentError("Byte count exceeds expectation.") // ErrEmpty occurs when an empty slice of bytes is received // for writing to a type. ErrEmpty = errors.NewInvalidArgumentError("No bytes provided.") )
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.