Documentation ¶
Overview ¶
Package binary implements WebAssembly integer decoding.
The Reader interface is overly specific as a performance optimization; see https://savo.la/sneaky-go-interface-conversion.html for background.
Index ¶
- func Uint32(r Reader) (uint32, int, error)
- func Uint64(r Reader) (uint64, int, error)
- func Varint32(r Reader) (int32, int, error)
- func Varint64(r Reader) (int64, int, error)
- func Varint7(r Reader) (int8, int, error)
- func Varuint1(r Reader) (bool, int, error)
- func Varuint32(r Reader) (uint32, int, error)
- func Varuint64(r Reader) (uint64, int, error)
- type Reader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Uint32 ¶
Uint32 reads a little-endian value. The number of bytes read is also returned (4 if successful).
func Uint64 ¶
Uint64 reads a little-endian value. The number of bytes read is also returned (8 if successful).
func Varint7 ¶
Varint7 reads a byte using the variable-length encoding for signed integers. The number of bytes read is also returned (0 or 1).
func Varuint1 ¶
Varuint1 reads a bit (in a byte). The number of bytes read is also returned (0 or 1).
Types ¶
Click to show internal directories.
Click to hide internal directories.