compressutil

package
v1.0.0-beta.27 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package compressutil decompresses image layers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecompressStream

func DecompressStream(r io.Reader) (compression.DecompressReadCloser, error)

DecompressStream is containerd's compression.DecompressStream: it detects whether r is uncompressed, gzip or zstd and returns its decompressed bytes, and the same for every stream. A zstd stream is decoded by a decoder reused from an earlier stream, which Close returns for the next one. Unlike containerd's, the decoder sizes its buffers to what the streams it decodes need: containerd's options allocate each of its block decoders' sequence buffer at the most a block can hold, 2.3 MB, for every stream, and a kept decoder holds all of them.

Types

This section is empty.

Jump to

Keyboard shortcuts

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