externaltoc

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const FooterSize = 46

The footer is an empty gzip stream with no compression and an Extra header.

46 comes from:

10 bytes gzip header 2 bytes XLEN (length of Extra field) = 21 (4 bytes header + len("STARGZEXTERNALTOC")) 2 bytes Extra: SI1 = 'S', SI2 = 'G' 2 bytes Extra: LEN = 17 (len("STARGZEXTERNALTOC")) 17 bytes Extra: subfield = "STARGZEXTERNALTOC" 5 bytes flate header 8 bytes gzip footer (End of the eStargz blob)

Variables

This section is empty.

Functions

func NewGzipCompressionWithLevel

func NewGzipCompressionWithLevel(provideTOC func() ([]byte, error), level int) estargz.Compression

Types

type GzipCompression

type GzipCompression struct {
	*GzipCompressor
	*GzipDecompressor
}

type GzipCompressor

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

func NewGzipCompressor

func NewGzipCompressor() *GzipCompressor

func NewGzipCompressorWithLevel

func NewGzipCompressorWithLevel(level int) *GzipCompressor

func (*GzipCompressor) WriteTOCAndFooter

func (gc *GzipCompressor) WriteTOCAndFooter(w io.Writer, off int64, toc *estargz.JTOC, diffHash hash.Hash) (digest.Digest, error)

func (*GzipCompressor) WriteTOCTo

func (gc *GzipCompressor) WriteTOCTo(w io.Writer) (int, error)

func (*GzipCompressor) Writer

type GzipDecompressor

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

func NewGzipDecompressor

func NewGzipDecompressor(provideTOCFunc func() ([]byte, error)) *GzipDecompressor

func (*GzipDecompressor) DecompressTOC

func (gz *GzipDecompressor) DecompressTOC(r io.Reader) (tocJSON io.ReadCloser, err error)

func (*GzipDecompressor) FooterSize

func (gz *GzipDecompressor) FooterSize() int64

func (*GzipDecompressor) ParseFooter

func (gz *GzipDecompressor) ParseFooter(p []byte) (blobPayloadSize, tocOffset, tocSize int64, err error)

func (*GzipDecompressor) ParseTOC

func (gz *GzipDecompressor) ParseTOC(r io.Reader) (toc *estargz.JTOC, tocDgst digest.Digest, err error)

func (*GzipDecompressor) Reader

func (gz *GzipDecompressor) Reader(r io.Reader) (io.ReadCloser, error)

Jump to

Keyboard shortcuts

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