marshal

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MatrixStateEmpty uint8 = iota
	MatrixStateNotEmpty
)

Variables

This section is empty.

Functions

func BlockMatrixToBytes

func BlockMatrixToBytes(buf *bytes.Buffer, blockMatrix define.BlockMatrix)

BlockMatrixToBytes write the bytes represents of blockMatrix into a bytes buffer.

func BlockNBTBytes

func BlockNBTBytes(compresser *utils.Compresser, blockNBT []define.NBTWithIndex) (result []byte, err error)

BlockNBTBytes return the bytes represents of blockNBT. blockNBT must contains all NBT blocks from the same chunk and in the same time.

func BytesToBlockMatrix

func BytesToBlockMatrix(buf *bytes.Buffer) define.BlockMatrix

BytesToBlockMatrix decode BlockMatrix from bytes buffer.

func BytesToBlockNBT

func BytesToBlockNBT(compresser *utils.Compresser, in []byte) (result []define.NBTWithIndex, err error)

BytesToBlockNBT decode multiple NBTWithIndex from bytes. Ensure all element in returned slice all represents the NBT blocks in the same chunk and in the same time.

func BytesToChunkDiffMatrix

func BytesToChunkDiffMatrix(compresser *utils.Compresser, in []byte, r operator_define.Range) (result define.ChunkDiffMatrix, err error)

BytesToChunkDiffMatrix decode ChunkDiffMatrix from bytes. r is the count of sub chunks that this chunk have.

func BytesToChunkMatrix

func BytesToChunkMatrix(compresser *utils.Compresser, in []byte, r operator_define.Range) (result define.ChunkMatrix, err error)

BytesToChunkMatrix decode ChunkMatrix from bytes. r is the count of sub chunks that this chunk have.

func BytesToDiffMatrix

func BytesToDiffMatrix(buf *bytes.Buffer) (result define.DiffMatrix)

BytesToDiffMatrix decode DiffMatrix from bytes buffer.

func BytesToLayers

func BytesToLayers(buf *bytes.Buffer) define.Layers

BytesToLayers decode Layers from bytes buffer.

func BytesToLayersDiff

func BytesToLayersDiff(buf *bytes.Buffer) define.LayersDiff

BytesToLayersDiff decode LayersDiff from bytes buffer.

func BytesToMultipleDiffNBT

func BytesToMultipleDiffNBT(compresser *utils.Compresser, in []byte) (result define.MultipleDiffNBT, err error)

BytesToMultipleDiffNBT decode MultipleDiffNBT from bytes.

func ChunkDiffMatrixToBytes

func ChunkDiffMatrixToBytes(compresser *utils.Compresser, chunkDiffMatrix define.ChunkDiffMatrix) (result []byte, err error)

ChunkDiffMatrixToBytes return the bytes represents of chunkDiffMatrix.

func ChunkMatrixToBytes

func ChunkMatrixToBytes(compresser *utils.Compresser, chunkMatrix define.ChunkMatrix) (result []byte, err error)

ChunkMatrixToBytes return the bytes represents of chunkMatrix.

func DiffMatrixToBytes

func DiffMatrixToBytes(buf *bytes.Buffer, diffMatrix define.DiffMatrix)

DiffMatrixToBytes writes the bytes represents of diffMatrix into a bytes buffer.

func LayersDiffToBytes

func LayersDiffToBytes(buf *bytes.Buffer, layersDiff define.LayersDiff)

LayersDiffToBytes writes the bytes represents of layersDiff into a bytes buffer.

func LayersToBytes

func LayersToBytes(buf *bytes.Buffer, layers define.Layers)

LayersToBytes writes the bytes represents of layers into a bytes buffer.

func MultipleDiffNBTBytes

func MultipleDiffNBTBytes(compresser *utils.Compresser, diff define.MultipleDiffNBT) (result []byte, err error)

MultipleDiffNBTBytes return the bytes represents of diff.

Types

This section is empty.

Jump to

Keyboard shortcuts

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