Documentation ¶
Index ¶
- Constants
- func NewGzipCompressionWithLevel(provideTOC func() ([]byte, error), level int) estargz.Compression
- type GzipCompression
- type GzipCompressor
- type GzipDecompressor
- func (gz *GzipDecompressor) DecompressTOC(r io.Reader) (tocJSON io.ReadCloser, err error)
- func (gz *GzipDecompressor) FooterSize() int64
- func (gz *GzipDecompressor) ParseFooter(p []byte) (blobPayloadSize, tocOffset, tocSize int64, err error)
- func (gz *GzipDecompressor) ParseTOC(r io.Reader) (toc *estargz.JTOC, tocDgst digest.Digest, err error)
- func (gz *GzipDecompressor) Reader(r io.Reader) (io.ReadCloser, error)
Constants ¶
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 (*GzipCompressor) WriteTOCTo ¶
func (gc *GzipCompressor) WriteTOCTo(w io.Writer) (int, error)
func (*GzipCompressor) Writer ¶
func (gc *GzipCompressor) Writer(w io.Writer) (estargz.WriteFlushCloser, error)
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) Reader ¶
func (gz *GzipDecompressor) Reader(r io.Reader) (io.ReadCloser, error)
Click to show internal directories.
Click to hide internal directories.