Categorygithub.com/amarin/binutils
modulepackage
0.6.0
Repository: https://github.com/amarin/binutils.git
Documentation: pkg.go.dev

# Functions

AllocateBytes creates a byte slice of required size.
CreateFile creates file and wrap file writer into BinaryWriter.
Int16 translates next 2 bytes from buffer into int16 value using big-endian bytes order.
Int16bytes adds int16 data to buffer using big-endian bytes order.
Int32 translates next 4 bytes from buffer into int32 value using big-endian bytes order.
Int32bytes adds int32 data to buffer using big-endian bytes order.
Int64 translates next 8 bytes from buffer into int64 value using big-endian bytes order.
Int64bytes adds uint64 data to buffer using big-endian bytes order.
Int8 translates next byte from buffer into int8 value.
Int8bytes adds int8 data to buffer.
NewBinaryReader wraps existing io.Reader into BinaryReader.
NewBinaryWriter wraps existing io.Writer instance into BinaryWriter.
OpenFile opens specified file path and returns BinaryReader wrapping it.
Rune translates specified 4 bytes into rune value using big-endian bytes order.
RuneBytes returns rune bytes representation using big-endian bytes order.
String reads a zero-terminated string from []byte sequence Returns error if last byte is not 0.
StringBytes makes a zero-terminated string []byte sequence.
Uint16 translates next 2 bytes from buffer into uint16 value using big-endian bytes order.
Uint16bytes adds uint16 data to buffer using big-endian bytes order.
Uint32 translates next 4 bytes from buffer into uint32 value using big-endian bytes order.
Uint32bytes adds uint32 data to buffer using big-endian bytes order.
Uint64 translates next 8 bytes from buffer into uint64 value using big-endian bytes order.
Uint64bytes adds uint64 data to buffer using big-endian bytes order.
Uint8 translates next byte from buffer into uint8 value.
Uint8bytes adds uint8 data to buffer.

# Constants

int16 size in bytes.
int32 size in bytes.
int64 size in bytes.
int8 size in bytes.
rune size in bytes.
uint16 size in bytes.
uint32 size in bytes.
uint64 size in bytes.
uint8 size in bytes.

# Variables

ErrClose returned if general close error.
ErrDecodeTo returned if decode error.
ErrExpected1 returned if expected exactly 1 byte.
ErrExpected2 returned if expected exactly 2 bytes.
ErrExpected4 returned if expected exactly 4 bytes.
ErrExpected8 returned if expected exactly 8 bytes.
ErrMinimum1 returned if expected at least 1 byte.
ErrNilPointer indicates nil pointer received when required valid pointer of specified type.
Error indicates any binutils errors.
ErrRead returned if general read error.
ErrRequired0T returned if expected 0-byte termination.
ErrWriter identifies any writer errors.
ErrWriterWrite identifies writer failed during write.

# Structs

BinaryReader implements binary writing for various data types into file writer.
BinaryWriter implements binary writing for various data types into file writer.

# Interfaces

BinaryReaderFrom interface wraps the BinaryReadFrom method.
BinaryWriterTo interface wraps the BinaryWriteTo method.