base_encoding

package
v1.9.7-0...-8dbb83f Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyCompressedSerializedUint64ListDiff

func ApplyCompressedSerializedUint64ListDiff(in, out []byte, diff []byte, reverse bool) ([]byte, error)

func ApplyCompressedSerializedValidatorListDiff

func ApplyCompressedSerializedValidatorListDiff(in, out []byte, diff []byte, reverse bool) ([]byte, error)

func ComputeCompressedSerializedEffectiveBalancesDiff

func ComputeCompressedSerializedEffectiveBalancesDiff(w io.Writer, old, new []byte) error

func ComputeCompressedSerializedUint64ListDiff

func ComputeCompressedSerializedUint64ListDiff(w io.Writer, old, new []byte) error

func ComputeCompressedSerializedValidatorSetListDiff

func ComputeCompressedSerializedValidatorSetListDiff(w io.Writer, old, new []byte) error

func Decode64FromBytes4

func Decode64FromBytes4(buf []byte) (x uint64)

func DecodeCompactUint64

func DecodeCompactUint64(buf []byte) (x uint64)

DecodeCompactUint64 decodes a number encoded with EncodeCompactUint64

func Encode64ToBytes4

func Encode64ToBytes4(x uint64) (out []byte)

func EncodeCompactUint64

func EncodeCompactUint64(x uint64) (out []byte)

Encode a number with least amount of bytes

func EncodePeriodAndRoot

func EncodePeriodAndRoot(period uint32, root libcommon.Hash) []byte

func IndexAndPeriodKey

func IndexAndPeriodKey(index, timeframe uint64) (out []byte)

IndexAndPeriodKey encodes index and period (can be epoch/slot/epoch period) into 8 bytes

func ReadRabbits

func ReadRabbits(out []uint64, r io.Reader) ([]uint64, error)

func WriteRabbits

func WriteRabbits(in []uint64, w io.Writer) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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