compressor

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompressionI

type CompressionI interface {
	// Compress compresses the given record of bytes
	Compress(record []byte) ([]byte, error)
	// Decompress decompresses the given byte buffer
	Decompress(buf []byte) ([]byte, error)

	// CompressWithBuf compresses the given record of bytes and a buffer where to compress into.
	// If the buffer doesn't fit, it will resize it (truncate/enlarging copy).
	// Thus, it's important to use the returned buffer value.
	CompressWithBuf(record []byte, destinationBuffer []byte) ([]byte, error)
	// DecompressWithBuf decompresses the given byte buffer and a buffer where to decompress into.
	// If the buffer doesn't fit, it will resize it (truncate/enlarging copy).
	// Thus, it's important to use the returned buffer value.
	DecompressWithBuf(buf []byte, destinationBuffer []byte) ([]byte, error)
}

type GzipCompressor

type GzipCompressor struct {
}

func (*GzipCompressor) Compress

func (c *GzipCompressor) Compress(record []byte) ([]byte, error)

func (*GzipCompressor) CompressWithBuf added in v1.3.0

func (c *GzipCompressor) CompressWithBuf(record []byte, destinationBuffer []byte) ([]byte, error)

func (*GzipCompressor) Decompress

func (c *GzipCompressor) Decompress(buf []byte) ([]byte, error)

func (*GzipCompressor) DecompressWithBuf added in v1.3.0

func (c *GzipCompressor) DecompressWithBuf(buf []byte, destinationBuffer []byte) ([]byte, error)

type LzwCompressor added in v1.4.0

type LzwCompressor struct {
}

func (LzwCompressor) Compress added in v1.4.0

func (l LzwCompressor) Compress(record []byte) ([]byte, error)

func (LzwCompressor) CompressWithBuf added in v1.4.0

func (l LzwCompressor) CompressWithBuf(record []byte, destinationBuffer []byte) ([]byte, error)

func (LzwCompressor) Decompress added in v1.4.0

func (l LzwCompressor) Decompress(buf []byte) ([]byte, error)

func (LzwCompressor) DecompressWithBuf added in v1.4.0

func (l LzwCompressor) DecompressWithBuf(buf []byte, destinationBuffer []byte) ([]byte, error)

type SnappyCompressor

type SnappyCompressor struct {
}

func (*SnappyCompressor) Compress

func (c *SnappyCompressor) Compress(record []byte) ([]byte, error)

func (*SnappyCompressor) CompressWithBuf added in v1.3.0

func (c *SnappyCompressor) CompressWithBuf(record []byte, destinationBuffer []byte) ([]byte, error)

func (*SnappyCompressor) Decompress

func (c *SnappyCompressor) Decompress(buf []byte) ([]byte, error)

func (*SnappyCompressor) DecompressWithBuf added in v1.3.0

func (c *SnappyCompressor) DecompressWithBuf(buf []byte, destinationBuffer []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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