compressedfs

package
v0.0.240 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLazyTarGzip

func NewLazyTarGzip(data []byte) fs.FS

NewLazyTarGzip returns a filesystem that inflates the archive on first use.

Types

type FS

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

FS is an in-memory filesystem loaded from a compressed archive.

func LoadTarGzip

func LoadTarGzip(data []byte) (*FS, error)

LoadTarGzip loads a gzip-compressed tar archive into an in-memory fs.FS.

func (*FS) Open

func (f *FS) Open(name string) (fs.File, error)

func (*FS) ReadDir

func (f *FS) ReadDir(name string) ([]fs.DirEntry, error)

func (*FS) ReadFile

func (f *FS) ReadFile(name string) ([]byte, error)

func (*FS) Stat

func (f *FS) Stat(name string) (fs.FileInfo, error)

type LazyFS

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

LazyFS defers loading a compressed archive until the first filesystem operation.

func (*LazyFS) Open

func (l *LazyFS) Open(name string) (fs.File, error)

func (*LazyFS) ReadDir

func (l *LazyFS) ReadDir(name string) ([]fs.DirEntry, error)

func (*LazyFS) ReadFile

func (l *LazyFS) ReadFile(name string) ([]byte, error)

func (*LazyFS) Stat

func (l *LazyFS) Stat(name string) (fs.FileInfo, error)

Jump to

Keyboard shortcuts

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