packfile

package
v0.4.0-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: ISC Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chunk

type Chunk struct {
	Offset uint32
	Length uint32
}

type PackFile

type PackFile struct {
	Data  []byte
	Index map[[32]byte]Chunk
}

func New

func New() *PackFile

func NewFromBytes

func NewFromBytes(serialized []byte) (*PackFile, error)

func (*PackFile) AddData

func (p *PackFile) AddData(checksum [32]byte, data []byte)

func (*PackFile) GetChunk

func (p *PackFile) GetChunk(checksum [32]byte) ([]byte, bool)

func (*PackFile) Serialize

func (p *PackFile) Serialize() ([]byte, error)

func (*PackFile) Size

func (p *PackFile) Size() uint32

Jump to

Keyboard shortcuts

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