Documentation
¶
Index ¶
- Constants
- func BlockMatrixToBytes(buf *bytes.Buffer, blockMatrix define.BlockMatrix)
- func BlockNBTBytes(compresser *utils.Compresser, blockNBT []define.NBTWithIndex) (result []byte, err error)
- func BytesToBlockMatrix(buf *bytes.Buffer) define.BlockMatrix
- func BytesToBlockNBT(compresser *utils.Compresser, in []byte) (result []define.NBTWithIndex, err error)
- func BytesToChunkDiffMatrix(compresser *utils.Compresser, in []byte, r operator_define.Range) (result define.ChunkDiffMatrix, err error)
- func BytesToChunkMatrix(compresser *utils.Compresser, in []byte, r operator_define.Range) (result define.ChunkMatrix, err error)
- func BytesToDiffMatrix(buf *bytes.Buffer) (result define.DiffMatrix)
- func BytesToLayers(buf *bytes.Buffer) define.Layers
- func BytesToLayersDiff(buf *bytes.Buffer) define.LayersDiff
- func BytesToMultipleDiffNBT(compresser *utils.Compresser, in []byte) (result define.MultipleDiffNBT, err error)
- func ChunkDiffMatrixToBytes(compresser *utils.Compresser, chunkDiffMatrix define.ChunkDiffMatrix) (result []byte, err error)
- func ChunkMatrixToBytes(compresser *utils.Compresser, chunkMatrix define.ChunkMatrix) (result []byte, err error)
- func DiffMatrixToBytes(buf *bytes.Buffer, diffMatrix define.DiffMatrix)
- func LayersDiffToBytes(buf *bytes.Buffer, layersDiff define.LayersDiff)
- func LayersToBytes(buf *bytes.Buffer, layers define.Layers)
- func MultipleDiffNBTBytes(compresser *utils.Compresser, diff define.MultipleDiffNBT) (result []byte, err error)
Constants ¶
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 ¶
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 ¶
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.