binary

package
v0.0.0-...-720af6a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package binary replaces the encoding/binary package in the standard library for little endian encoding using generics.

Index

Constants

This section is empty.

Variables

Functions

func Get

func Get[T constraints.Integer](b []byte) T

Get gets any Uint size from a []byte slice.

func Put

func Put[T constraints.Integer](b []byte, v T)

Put puts any Uint size into a []byte slice.

func PutBuffer

func PutBuffer[T constraints.Integer](buff *bytes.Buffer, v T) error

PutBuffer encodes an integer into the passed Buffer.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL