serialization

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateStructStructureHash

func GenerateStructStructureHash(data interface{}) uint32

GenerateStructStructureHash / <summary> / Generates a hash for the structure of a struct. / </summary> / <param name="data">The struct to generate a hash for.</param> / <returns>The hash of the structure of the struct.</returns>

Types

type Length

type Length = Offset

Length is an alias for the Offset type, indicating a length or size within the file array.

type Offset

type Offset uint64

Offset represents an offset within a file array.

func MaxOffset

func MaxOffset() Offset

MaxOffset returns the maximum value representable by the Offset type. It does so by performing a bitwise NOT operation on an Offset initialized with 0, effectively flipping all its bits to set them to 1, resulting in the maximum possible Offset value.

type Serializer

type Serializer[T any] interface {
	SerializeToBinaryStream(buffer []byte) error
	DeserializeFromBinaryStream(buffer []byte) (T, error)
	StrideLength() Length
	IDByte() byte
}

Jump to

Keyboard shortcuts

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