compress

package
v0.0.0-...-5d42db8 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: Apache-2.0 Imports: 4 Imported by: 9

Documentation

Overview

Package compress provides the generic APIs implemented by parquet compression codecs.

https://github.com/apache/parquet-format/blob/master/Compression.md

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec interface {
	// Returns a human-readable name for the codec.
	String() string

	// Returns the code of the compression codec in the parquet format.
	CompressionCodec() format.CompressionCodec

	// Writes the compressed version of src to dst and returns it.
	//
	// The method automatically reallocates the output buffer if its capacity
	// was too small to hold the compressed data.
	Encode(dst, src []byte) ([]byte, error)

	// Writes the uncompressed version of src to dst and returns it.
	//
	// The method automatically reallocates the output buffer if its capacity
	// was too small to hold the uncompressed data.
	Decode(dst, src []byte) ([]byte, error)
}

The Codec interface represents parquet compression codecs implemented by the compress sub-packages.

Codec instances must be safe to use concurrently from multiple goroutines.

type Compressor

type Compressor struct {
	// contains filtered or unexported fields
}

func (*Compressor) Encode

func (c *Compressor) Encode(dst, src []byte, newWriter func(io.Writer) (Writer, error)) ([]byte, error)

type Decompressor

type Decompressor struct {
	// contains filtered or unexported fields
}

func (*Decompressor) Decode

func (d *Decompressor) Decode(dst, src []byte, newReader func(io.Reader) (Reader, error)) ([]byte, error)

type Reader

type Reader interface {
	io.ReadCloser
	Reset(io.Reader) error
}

type Writer

type Writer interface {
	io.WriteCloser
	Reset(io.Writer)
}

Directories

Path Synopsis
Package brotli implements the BROTLI parquet compression codec.
Package brotli implements the BROTLI parquet compression codec.
Package gzip implements the GZIP parquet compression codec.
Package gzip implements the GZIP parquet compression codec.
Package lz4 implements the LZ4_RAW parquet compression codec.
Package lz4 implements the LZ4_RAW parquet compression codec.
Package snappy implements the SNAPPY parquet compression codec.
Package snappy implements the SNAPPY parquet compression codec.
Package uncompressed provides implementations of the compression codec interfaces as pass-through without applying any compression nor decompression.
Package uncompressed provides implementations of the compression codec interfaces as pass-through without applying any compression nor decompression.
Package zstd implements the ZSTD parquet compression codec.
Package zstd implements the ZSTD parquet compression codec.

Jump to

Keyboard shortcuts

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