package
1.24.4
Repository: https://pkg.go.dev/std
Documentation: pkg.go.dev

# Functions

Append appends the binary representation of data to buf.
AppendUvarint appends the varint-encoded form of x, as generated by [PutUvarint], to buf and returns the extended buffer.
AppendVarint appends the varint-encoded form of x, as generated by [PutVarint], to buf and returns the extended buffer.
Decode decodes binary data from buf into data according to the given byte order.
Encode encodes the binary representation of data into buf according to the given byte order.
PutUvarint encodes a uint64 into buf and returns the number of bytes written.
PutVarint encodes an int64 into buf and returns the number of bytes written.
Read reads structured binary data from r into data.
ReadUvarint reads an encoded unsigned integer from r and returns it as a uint64.
ReadVarint reads an encoded signed integer from r and returns it as an int64.
Size returns how many bytes [Write] would generate to encode the value v, which must be a fixed-size value or a slice of fixed-size values, or a pointer to such data.
Uvarint decodes a uint64 from buf and returns that value and the number of bytes read (> 0).
Varint decodes an int64 from buf and returns that value and the number of bytes read (> 0).
Write writes the binary representation of data into w.

# Constants

MaxVarintLenN is the maximum length of a varint-encoded N-bit integer.
MaxVarintLenN is the maximum length of a varint-encoded N-bit integer.
MaxVarintLenN is the maximum length of a varint-encoded N-bit integer.

# Variables

BigEndian is the big-endian implementation of [ByteOrder] and [AppendByteOrder].
LittleEndian is the little-endian implementation of [ByteOrder] and [AppendByteOrder].
NativeEndian is the native-endian implementation of [ByteOrder] and [AppendByteOrder].

# Interfaces

AppendByteOrder specifies how to append 16-, 32-, or 64-bit unsigned integers into a byte slice.
A ByteOrder specifies how to convert byte slices into 16-, 32-, or 64-bit unsigned integers.