package compress

Import Path
	github.com/apache/arrow-go/v18/parquet/compress (on go.dev)

Dependency Relation
	imports 12 packages, and imported by one package

Involved Source Files brotli.go Package compress contains the interfaces and implementations for handling compression/decompression of parquet data at the column levels. gzip.go lz4_raw.go snappy.go zstd.go
Package-Level Type Names (total 3)
/* sort by: | */
Codec is an interface which is implemented for each compression type in order to make the interactions easy to implement. Most consumers won't be calling GetCodec directly. CompressBound returns the boundary of maximum size of compressed data under the chosen codec. Decode is for decoding a single block rather than a stream, like with Encode, dst must be either nil or sized large enough to accommodate the uncompressed data and should not overlap with src. the returned slice *might* be a slice of dst. Encode encodes a block of data given by src and returns the compressed block. dst should be either nil or sized large enough to fit the compressed block (use CompressBound to allocate). dst and src should not overlap since some of the compression types don't allow it. The returned slice will be one of the following: 1. If dst was nil or dst was too small to fit the compressed data, it will be a newly allocated slice 2. If dst was large enough to fit the compressed data (depending on the compression algorithm it might be required to be at least CompressBound length) then it might be a slice of dst. EncodeLevel is like Encode, but specifies a particular encoding level instead of the default. func GetCodec(typ Compression) (Codec, error) func RegisterCodec(compression Compression, codec Codec)
Compression is an alias to the thrift compression codec enum type for easy use ( Compression) MarshalText() ([]byte, error) ( Compression) String() string (*Compression) UnmarshalText(text []byte) error Compression : encoding.TextMarshaler *Compression : encoding.TextUnmarshaler Compression : expvar.Var Compression : fmt.Stringer func github.com/apache/arrow-go/v18/parquet.(*WriterProperties).Compression() Compression func github.com/apache/arrow-go/v18/parquet.(*WriterProperties).CompressionFor(path string) Compression func github.com/apache/arrow-go/v18/parquet.(*WriterProperties).CompressionPath(path parquet.ColumnPath) Compression func GetCodec(typ Compression) (Codec, error) func RegisterCodec(compression Compression, codec Codec) func github.com/apache/arrow-go/v18/parquet.WithCompression(codec Compression) parquet.WriterProperty func github.com/apache/arrow-go/v18/parquet.WithCompressionFor(path string, codec Compression) parquet.WriterProperty func github.com/apache/arrow-go/v18/parquet.WithCompressionPath(path parquet.ColumnPath, codec Compression) parquet.WriterProperty
StreamingCodec is an interface that may be implemented for compression codecs that expose a streaming API. NewReader provides a reader that wraps a stream with compressed data to stream the uncompressed data NewWriter provides a wrapper around a write stream to compress data before writing it. NewWriterLevel is like NewWriter but allows specifying the compression level
Package-Level Functions (total 2)
GetCodec returns a Codec interface for the requested Compression type
RegisterCodec adds or overrides a codec implementation for a given compression algorithm. The intended use case is within the init() section of a package. For example, // inside a custom codec package, say czstd func init() { RegisterCodec(compress.Codecs.Zstd, czstdCodec{}) } type czstdCodec struct{} // implementing Codec interface using CGO based ZSTD wrapper And user of the custom codec can import the above package like below, package main import _ "package/path/to/czstd"
Package-Level Variables (only one)
Codecs is a useful struct to provide namespaced enum values to use for specifying the compression type to use which make for easy internal swapping between them and the thrift enum since they are initialized to the same constant values.
Package-Level Constants (only one)
DefaultCompressionLevel will use flate.DefaultCompression since many of the compression libraries use that to denote "use the default".