encodingext

package
v0.0.0-...-ea98ea7 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MarshalTypeZSTDBytesArray is used for marshaling bytes array
	MarshalTypeZSTDBytesArray = MarshalType(7)
)

Variables

This section is empty.

Functions

func CheckMarshalType

func CheckMarshalType(mt MarshalType) error

CheckMarshalType verifies whether the mt is valid.

func UnmarshalValues

func UnmarshalValues(dst [][]byte, src []byte, mt MarshalType, itemsCount int) ([][]byte, error)

UnmarshalValues unmarshals values from src, appends them to dst and returns the resulting dst.

firstValue must be the value returned from MarshalValues.

Types

type MarshalType

type MarshalType = encoding.MarshalType

MarshalType is the type used for the marshaling.

func MarshalValues

func MarshalValues(dst []byte, values [][]byte) (result []byte, mt MarshalType)

MarshalValues marshals values, appends the marshaled result to dst and returns the dst.

precisionBits must be in the range [1...64], where 1 means 50% precision, while 64 means 100% precision, i.e. lossless encoding.

Jump to

Keyboard shortcuts

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