compression

package module
v0.63.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: Apache-2.0 Imports: 2 Imported by: 11

Documentation

Overview

Package compression provides a set of constants describing the compression options

Index

Constants

View Source
const GzipEncoding = "gzip"

GzipEncoding is the content-encoding value for Gzip

View Source
const GzipKind = "gzip"

GzipKind defines a const value for the gzip compressor

View Source
const NoneKind = "none"

NoneKind defines a const value for disabling compression

View Source
const ZlibEncoding = "deflate"

ZlibEncoding is the content-encoding value for Zlib

View Source
const ZlibKind = "zlib"

ZlibKind defines a const value for the zlib compressor

View Source
const ZstdEncoding = "zstd"

ZstdEncoding is the content-encoding value for Zstd

View Source
const ZstdKind = "zstd"

ZstdKind defines a const value for the zstd compressor

Variables

This section is empty.

Functions

This section is empty.

Types

type Compressor

type Compressor interface {
	Compress(src []byte) ([]byte, error)
	Decompress(src []byte) ([]byte, error)
	CompressBound(sourceLen int) int
	ContentEncoding() string
	NewStreamCompressor(output *bytes.Buffer) StreamCompressor
}

Compressor is the interface that a given compression algorithm needs to implement

type StreamCompressor

type StreamCompressor interface {
	io.WriteCloser
	Flush() error
}

StreamCompressor is the interface that the compression algorithm should implement for streaming

type ZstdCompressionLevel

type ZstdCompressionLevel int

ZstdCompressionLevel is a wrapper type over int for the compression level for zstd compression, if that is selected.

Directories

Path Synopsis
Package gzipimpl provides a set of functions for compressing with zlib / zstd / gzip
Package gzipimpl provides a set of functions for compressing with zlib / zstd / gzip
Package noopimpl provides a set of functions for compressing with zlib / zstd
Package noopimpl provides a set of functions for compressing with zlib / zstd
Package zlibimpl provides a set of functions for compressing with zlib
Package zlibimpl provides a set of functions for compressing with zlib
Package zstdimpl provides a set of functions for compressing with zstd
Package zstdimpl provides a set of functions for compressing with zstd
Package zstdimpl provides a set of functions for compressing with zstd
Package zstdimpl provides a set of functions for compressing with zstd
Package selector provides correct compression impl to fx
Package selector provides correct compression impl to fx

Jump to

Keyboard shortcuts

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