Categorygithub.com/yehan2002/fastbytes/v2
modulepackage
2.3.0
Repository: https://github.com/yehan2002/fastbytes.git
Documentation: pkg.go.dev

# README

Test Go Report CardGo Reference

FastBytes

FastBytes is a go package for translating between slices with fixed-size integers/floats and byte slices.

Supported Types

Floats and all signed/unsigned integers except uint and int can be translated by this package. uint and int are not supported since their size is platform dependent.

Usage

GoDoc

Usage of assembly code

This package uses assembly for copying data on certain platforms. To disable the usage of assembly set the purego build tag when building.

Usage of unsafe.Pointer

This package uses the unsafe package to covert between slice/array types and to extract pointers from interface{} values. To disable the usage of unsafe set the no_unsafe build tag when building. Note that this also disables the usage of assembly.

# Constants

ErrOffset returned by [Endianess.FromValueOffset] and [Endianess.ToValueOffset] if the given offsets are not valid.
ErrUnaddressable the given [reflect.Value] cannot be addressed.
ErrUnadressable typo Deprecated: Use [ErrUnaddressable] instead.
ErrUnsupported the given type is not supported.

# Variables

BigEndian copies bytes to and from big endian byte slices.
LittleEndian copies bytes to and from little endian byte slices.

# Structs

Endianess provides methods to read and write integer/float slices.

# Interfaces

ByteOrder a byteorder.