zstpak

package
v0.0.0-...-1cdf030 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompressInto

func CompressInto(in io.Reader, out io.Writer, chunkSize uint64) error

CompressInto reads data from an input reader, writing it out in compressed form. The chunk size determines how often to create new chunks. Higher numbers increase compression rates, but come at the cost of making random access less efficient.

Types

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Reader allows random access reads within zstpak files. Created via the `Open` method.

func Open

func Open(path string) (*Reader, error)

Open a zstpak file for random access reading.

func (*Reader) ChunkSize

func (reader *Reader) ChunkSize() uint64

ChunkSize returns the size of the compressed chunks in this file.

func (*Reader) Close

func (reader *Reader) Close() error

Close implements the `Closer` interface.

func (*Reader) ReadAt

func (reader *Reader) ReadAt(p []byte, off int64) (n int, err error)

ReadAt implements the `ReaderAt` interface.

func (*Reader) UncompressedSize

func (reader *Reader) UncompressedSize() uint64

UncompressedSize returns the size of the packed file if it was fully decompressed.

Jump to

Keyboard shortcuts

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