stream

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: Zlib Imports: 14 Imported by: 0

Documentation

Overview

Package stream decodes the compressed data portions described by the parser's internal format model. It intentionally knows nothing about output paths or installation semantics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extract

func Extract(r io.ReaderAt, a *format.Archive, opts Options, verifyOnly bool) ([]Result, []Failure, error)

Extract decodes all files described by a parsed archive. It returns successful files and file-local failures separately so callers can report a useful partial result. Password and archive-wide format errors are returned as the final error.

Types

type Failure

type Failure struct {
	FileIndex int
	Err       error
}

Failure contains a file-local extraction failure. Archive-wide structural errors are returned as the third result from Extract.

type Options

type Options struct {
	Password    string
	MemoryLimit int64
	Slices      func(uint32) (io.ReaderAt, error)
}

Options controls data-stream decoding. Slices is used only when the archive stores data outside the executable. A slice ReaderAt may either expose the raw payload or the complete .bin file; the latter is validated and its 12-byte slice header is hidden by this package.

type Result

type Result struct {
	FileIndex int
	Data      []byte
}

Result contains one successfully decoded archive file. FileIndex is the index into format.Archive.Files. In verifyOnly mode Data is nil.

Jump to

Keyboard shortcuts

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