compression

package
v0.0.1-alpha.1 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: 11 Imported by: 0

Documentation

Overview

Package compression defines the mechanism for configuring decompress streams used to unpack image layer tarballs.

Copied and modified from https://github.com/containerd/containerd/blob/bcc810d6b9066471b0b6fa75f557a15a1cbf31bb/archive/compression

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeDecompressStreams

func InitializeDecompressStreams(streams map[string]config.DecompressStream) error

InitializeDecompressStreams initializes the snapshotter's decompress stream functions.

This function is a singleton function; after the first call follow on calls will produce the same result.

Types

type DecompressStream

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

DecompressStream is any function which decompresses an archive.

It is defined to match github.com/containerd/containerd/archive/compression.DecompressStream for easier swapping of decompress stream functionality.

func GetDecompressStream

func GetDecompressStream(layerMediaType string) (DecompressStream, bool)

GetDecompressStream returns the decompress stream function for a provided layer media type if the snapshotter has been configured to decompress it.

If no decompression stream is found, then return false.

Jump to

Keyboard shortcuts

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