gozelle

package module
v0.0.0-...-6fdd550 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: GPL-3.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBlockNotPrepared = errors.New("block not prepared")

Functions

This section is empty.

Types

type Block

type Block struct {
	Offset uint64 `json:"offset"`
	Length uint64 `json:"length"`
	// contains filtered or unexported fields
}

func (Block) Close

func (b Block) Close() error

func (*Block) Prepare

func (b *Block) Prepare(key []byte, src io.ReaderAt, mode Mode) error

func (Block) Read

func (b Block) Read(dst []byte) (int, error)

type File

type File struct {
	Blocks []Block `json:"blocks"`
	Mode   Mode    `json:"mode"`
}

func (*File) Close

func (f *File) Close() error

func (*File) Prepare

func (f *File) Prepare(key []byte, src io.ReaderAt) error

func (*File) Read

func (f *File) Read(dst []byte) (int, error)

type Index

type Index map[uint64]*File

func ReadIndex

func ReadIndex(r io.Reader) (Index, error)

type Item

type Item struct {
	NameOffset  uint32 `json:"nameOffset"`
	Size        uint32 `json:"size"`
	ID          uint32 `json:"id"`
	Type        uint32 `json:"type"`
	ParentIndex uint32 `json:"parentIndex"`
	NextIndex   uint32 `json:"nextIndex"`
	FirstIndex  uint32 `json:"firstIndex"`

	Name string `json:"name"`
	Path string `json:"path"`
}

func (Item) IsDirectory

func (i Item) IsDirectory() bool

type KeyFile

type KeyFile struct {
	Keys map[string]string `json:"keys"`
}

type Keys

type Keys map[int][]byte

func ReadKeys

func ReadKeys(r io.Reader) (Keys, error)

type Manifest

type Manifest struct {
	Dummy1       uint32 `json:"dummy1"`
	DepotID      uint32 `json:"depotID"`
	DepotVersion uint32 `json:"depotVersion"`
	NumItems     uint32 `json:"numItems"`
	NumFiles     uint32 `json:"numFiles"`
	BlockSize    uint32 `json:"blockSize"`
	DirSize      uint32 `json:"dirSize"`
	DirNameSize  uint32 `json:"dirNameSize"`
	InfoCount    uint32 `json:"infoCount"`
	CopyCount    uint32 `json:"copyCount"`
	LocalCount   uint32 `json:"localCount"`
	Dummy2       uint32 `json:"dummy2"`
	Dummy3       uint32 `json:"dummy3"`
	Checksum     uint32 `json:"checksum"`

	Items []Item `json:"items"`
}

func ReadManifest

func ReadManifest(r io.ReadSeeker) (Manifest, error)

type Mode

type Mode uint64
const (
	Raw Mode = iota
	Compressed
	EncryptedCompressed
	Encrypted
)

Jump to

Keyboard shortcuts

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