initrd

package
v0.0.0-...-30f928a Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compression

type Compression int
const (
	Undetermined Compression = iota
	Identity
	Gzip
)

type CpioFileReader

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

func NewCpioFileReader

func NewCpioFileReader(path string) (*CpioFileReader, error)

func (*CpioFileReader) Compression

func (r *CpioFileReader) Compression() Compression

func (*CpioFileReader) Read

func (r *CpioFileReader) Read(p []byte) (int, error)

func (*CpioFileReader) SetCompression

func (r *CpioFileReader) SetCompression(comp Compression) error

type CpioReader

type CpioReader interface {
	Read(p []byte) (n int, err error)
	SetCompression(Compression) error
	Compression() Compression
}

type DedupedReader

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

func NewDedupedReader

func NewDedupedReader(readers []CpioReader) (*DedupedReader, error)

func (*DedupedReader) Compression

func (d *DedupedReader) Compression() Compression

Compression - return the compression for this reader

if all of the readers are the same, it can return that compression
otherwise it has to return identity.

func (*DedupedReader) Read

func (d *DedupedReader) Read(p []byte) (n int, err error)

func (*DedupedReader) SetCompression

func (d *DedupedReader) SetCompression(comp Compression) error

Jump to

Keyboard shortcuts

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