Help us shape the future of Go! Take the 2026 Go Developer Survey

compression

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package compression provides an idiomatic Go wrapper over the raw Compression C-library bindings: opaque handles become typed wrappers with methods, the C symbol prefix is stripped, and OSStatus/kern_return_t results become Go errors.

Index

Constants

View Source
const (
	COMPRESSION_BROTLI          = raw.COMPRESSION_BROTLI
	COMPRESSION_LZ4             = raw.COMPRESSION_LZ4
	COMPRESSION_LZ4_RAW         = raw.COMPRESSION_LZ4_RAW
	COMPRESSION_LZBITMAP        = raw.COMPRESSION_LZBITMAP
	COMPRESSION_LZFSE           = raw.COMPRESSION_LZFSE
	COMPRESSION_LZMA            = raw.COMPRESSION_LZMA
	COMPRESSION_LZMESH          = raw.COMPRESSION_LZMESH
	COMPRESSION_LZRAVEN         = raw.COMPRESSION_LZRAVEN
	COMPRESSION_STATUS_END      = raw.COMPRESSION_STATUS_END
	COMPRESSION_STATUS_ERROR    = raw.COMPRESSION_STATUS_ERROR
	COMPRESSION_STATUS_OK       = raw.COMPRESSION_STATUS_OK
	COMPRESSION_STREAM_DECODE   = raw.COMPRESSION_STREAM_DECODE
	COMPRESSION_STREAM_ENCODE   = raw.COMPRESSION_STREAM_ENCODE
	COMPRESSION_STREAM_FINALIZE = raw.COMPRESSION_STREAM_FINALIZE
	COMPRESSION_ZLIB            = raw.COMPRESSION_ZLIB
)

Variables

This section is empty.

Functions

func DecodeBuffer added in v0.19.0

func DecodeBuffer(dst_buffer *uint8, dst_size uint64, src_buffer *uint8, src_size uint64, scratch_buffer unsafe.Pointer, algorithm raw.CompressionAlgorithm) uint64

func DecodeScratchBufferSize added in v0.19.0

func DecodeScratchBufferSize(algorithm raw.CompressionAlgorithm) uint64

func EncodeBuffer added in v0.19.0

func EncodeBuffer(dst_buffer *uint8, dst_size uint64, src_buffer *uint8, src_size uint64, scratch_buffer unsafe.Pointer, algorithm raw.CompressionAlgorithm) uint64

func EncodeScratchBufferSize added in v0.19.0

func EncodeScratchBufferSize(algorithm raw.CompressionAlgorithm) uint64

func StreamDestroy added in v0.19.0

func StreamDestroy(stream *raw.CompressionStream) raw.CompressionStatus

func StreamInit added in v0.19.0

func StreamProcess added in v0.19.0

func StreamProcess(stream *raw.CompressionStream, flags int32) raw.CompressionStatus

Types

type CompressionAlgorithm added in v0.18.0

type CompressionAlgorithm = raw.CompressionAlgorithm

type CompressionStatus added in v0.18.0

type CompressionStatus = raw.CompressionStatus

type CompressionStream added in v0.18.0

type CompressionStream = raw.CompressionStream

type CompressionStreamFlags added in v0.18.0

type CompressionStreamFlags = raw.CompressionStreamFlags

type CompressionStreamOperation added in v0.18.0

type CompressionStreamOperation = raw.CompressionStreamOperation

Jump to

Keyboard shortcuts

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