bint

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

big endian, uint64 binary encoding/decoding

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(b []byte) uint64

Decodes big-endian byte array into a uint64 left-padded zero bytes are ignored. Disregards extra bytes if len(b) > 8

func Encode

func Encode(b []byte, n uint64) []byte

Encodes a uint64 into a big-endian byte slice To avoid an allocation, or to have a padded result, supply an initialized value for b -otherwise use nil. Panics when provided slice is too small for n.

Types

This section is empty.

Jump to

Keyboard shortcuts

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