Documentation
¶
Overview ¶
Package alpine provides high-performance compression for sequential numeric data. It supports both float64 (with ALP lossless compression) and int64 data, with multiple encoding modes optimized for different data patterns.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoRiceParam ¶
AutoRiceParam calculates the optimal Rice parameter for given deltas. This is a convenience function for advanced users who want to pre-calculate.
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder is a builder for decoding compressed data
func NewDecoder ¶
NewDecoder creates a new Decoder with the given encoded data
func (*Decoder) DecodeFloat ¶
DecodeFloat decodes the encoded data as float64 values
type FloatEncoder ¶
type FloatEncoder struct {
// contains filtered or unexported fields
}
FloatEncoder is a builder for encoding float64 data
func NewFloatEncoder ¶
func NewFloatEncoder(data []float64) *FloatEncoder
NewFloatEncoder creates a new FloatEncoder with the given data
func (*FloatEncoder) Encode ¶
func (e *FloatEncoder) Encode() ([]byte, error)
Encode compresses the float64 data and returns the encoded bytes
func (*FloatEncoder) WithAutoPrecision ¶
func (e *FloatEncoder) WithAutoPrecision() *FloatEncoder
WithAutoPrecision enables automatic precision detection
func (*FloatEncoder) WithAutoRiceParam ¶
func (e *FloatEncoder) WithAutoRiceParam() *FloatEncoder
WithAutoRiceParam enables automatic Rice parameter detection
func (*FloatEncoder) WithPrecision ¶
func (e *FloatEncoder) WithPrecision(precision int) *FloatEncoder
WithPrecision sets the ALP precision exponent (0 = auto, -1 = auto-detect) Valid values are 0-17
func (*FloatEncoder) WithRiceParam ¶
func (e *FloatEncoder) WithRiceParam(param int) *FloatEncoder
WithRiceParam sets the Golomb-Rice parameter for encoding
type IntEncoder ¶
type IntEncoder struct {
// contains filtered or unexported fields
}
IntEncoder is a builder for encoding int64 data
func NewIntEncoder ¶
func NewIntEncoder(data []int64) *IntEncoder
NewIntEncoder creates a new IntEncoder with the given data
func (*IntEncoder) Encode ¶
func (e *IntEncoder) Encode() ([]byte, error)
Encode compresses the int64 data using predictive delta encoding and returns the encoded bytes
func (*IntEncoder) WithAutoRiceParam ¶
func (e *IntEncoder) WithAutoRiceParam() *IntEncoder
WithAutoRiceParam enables automatic Rice parameter detection
func (*IntEncoder) WithRiceParam ¶
func (e *IntEncoder) WithRiceParam(param int) *IntEncoder
WithRiceParam sets the Golomb-Rice parameter for encoding