package encoding

Import Path
	github.com/parquet-go/parquet-go/encoding (on go.dev)

Dependency Relation
	imports 6 packages, and imported by 7 packages

Involved Source Files Package encoding provides the generic APIs implemented by parquet encodings in its sub-packages. notsupported.go values.go
Package-Level Type Names (total 4)
/* sort by: | */
The Encoding interface is implemented by types representing parquet column encodings. Encoding instances must be safe to use concurrently from multiple goroutines. When this method returns true, the encoding supports receiving the same buffer as source and destination. ( Encoding) DecodeBoolean(dst []byte, src []byte) ([]byte, error) ( Encoding) DecodeByteArray(dst []byte, src []byte, offsets []uint32) ([]byte, []uint32, error) ( Encoding) DecodeDouble(dst []float64, src []byte) ([]float64, error) ( Encoding) DecodeFixedLenByteArray(dst []byte, src []byte, size int) ([]byte, error) ( Encoding) DecodeFloat(dst []float32, src []byte) ([]float32, error) ( Encoding) DecodeInt32(dst []int32, src []byte) ([]int32, error) ( Encoding) DecodeInt64(dst []int64, src []byte) ([]int64, error) ( Encoding) DecodeInt96(dst []deprecated.Int96, src []byte) ([]deprecated.Int96, error) Decode methods deserialize from the source buffer into the destination slice, potentially growing it if it was too short to contain the result. The methods panic if the type of dst values differ from the type of values being decoded. ( Encoding) EncodeBoolean(dst []byte, src []byte) ([]byte, error) ( Encoding) EncodeByteArray(dst []byte, src []byte, offsets []uint32) ([]byte, error) ( Encoding) EncodeDouble(dst []byte, src []float64) ([]byte, error) ( Encoding) EncodeFixedLenByteArray(dst []byte, src []byte, size int) ([]byte, error) ( Encoding) EncodeFloat(dst []byte, src []float32) ([]byte, error) ( Encoding) EncodeInt32(dst []byte, src []int32) ([]byte, error) ( Encoding) EncodeInt64(dst []byte, src []int64) ([]byte, error) ( Encoding) EncodeInt96(dst []byte, src []deprecated.Int96) ([]byte, error) Encode methods serialize the source sequence of values into the destination buffer, potentially reallocating it if it was too short to contain the output. The methods panic if the type of src values differ from the type of values being encoded. Returns the parquet code representing the encoding. Computes an estimation of the output size of decoding the encoded page of values passed as argument. Note that this is an estimate, it is useful to preallocate the output buffer that will be passed to the decode method, but the actual output size may be different. The estimate never errors since it is not intended to be used as an input validation method. Returns a human-readable name for the encoding. NotSupported *github.com/parquet-go/parquet-go/encoding/bitpacked.Encoding *github.com/parquet-go/parquet-go/encoding/bytestreamsplit.Encoding *github.com/parquet-go/parquet-go/encoding/delta.BinaryPackedEncoding *github.com/parquet-go/parquet-go/encoding/delta.ByteArrayEncoding *github.com/parquet-go/parquet-go/encoding/delta.LengthByteArrayEncoding *github.com/parquet-go/parquet-go/encoding/plain.DictionaryEncoding *github.com/parquet-go/parquet-go/encoding/plain.Encoding *github.com/parquet-go/parquet-go/encoding/rle.DictionaryEncoding *github.com/parquet-go/parquet-go/encoding/rle.Encoding Encoding : expvar.Var Encoding : fmt.Stringer func github.com/parquet-go/parquet-go.LookupEncoding(enc format.Encoding) Encoding func github.com/parquet-go/parquet-go.BloomFilterColumn.Encoding() Encoding func github.com/parquet-go/parquet-go.(*Column).Encoding() Encoding func github.com/parquet-go/parquet-go.Field.Encoding() Encoding func github.com/parquet-go/parquet-go.Group.Encoding() Encoding func github.com/parquet-go/parquet-go.Node.Encoding() Encoding func github.com/parquet-go/parquet-go.(*Schema).Encoding() Encoding func CanEncodeBoolean(e Encoding) bool func CanEncodeByteArray(e Encoding) bool func CanEncodeDouble(e Encoding) bool func CanEncodeFixedLenByteArray(e Encoding) bool func CanEncodeFloat(e Encoding) bool func CanEncodeInt32(e Encoding) bool func CanEncodeInt64(e Encoding) bool func CanEncodeInt96(e Encoding) bool func CanEncodeLevels(e Encoding) bool func DecodeBoolean(dst Values, src []byte, enc Encoding) (Values, error) func DecodeByteArray(dst Values, src []byte, enc Encoding) (Values, error) func DecodeDouble(dst Values, src []byte, enc Encoding) (Values, error) func DecodeFixedLenByteArray(dst Values, src []byte, enc Encoding) (Values, error) func DecodeFloat(dst Values, src []byte, enc Encoding) (Values, error) func DecodeInt32(dst Values, src []byte, enc Encoding) (Values, error) func DecodeInt64(dst Values, src []byte, enc Encoding) (Values, error) func DecodeInt96(dst Values, src []byte, enc Encoding) (Values, error) func EncodeBoolean(dst []byte, src Values, enc Encoding) ([]byte, error) func EncodeByteArray(dst []byte, src Values, enc Encoding) ([]byte, error) func EncodeDouble(dst []byte, src Values, enc Encoding) ([]byte, error) func EncodeFixedLenByteArray(dst []byte, src Values, enc Encoding) ([]byte, error) func EncodeFloat(dst []byte, src Values, enc Encoding) ([]byte, error) func EncodeInt32(dst []byte, src Values, enc Encoding) ([]byte, error) func EncodeInt64(dst []byte, src Values, enc Encoding) ([]byte, error) func EncodeInt96(dst []byte, src Values, enc Encoding) ([]byte, error) func ErrDecodeInvalidInputSize(e Encoding, typ string, size int) error func ErrEncodeInvalidInputSize(e Encoding, typ string, size int) error func Error(e Encoding, err error) error func Errorf(e Encoding, msg string, args ...interface{}) error func github.com/parquet-go/parquet-go.Encoded(node parquet.Node, encoding Encoding) parquet.Node func github.com/parquet-go/parquet-go.Type.Decode(dst Values, src []byte, enc Encoding) (Values, error) func github.com/parquet-go/parquet-go.Type.Encode(dst []byte, src Values, enc Encoding) ([]byte, error) func github.com/parquet-go/parquet-go.Type.EstimateDecodeSize(numValues int, src []byte, enc Encoding) int
( Kind) String() string Kind : expvar.Var Kind : fmt.Stringer func (*Values).Kind() Kind const Boolean const ByteArray const Double const FixedLenByteArray const Float const Int32 const Int64 const Int96 const Undefined
NotSupported is a type satisfying the Encoding interface which does not support encoding nor decoding any value types. ( NotSupported) CanDecodeInPlace() bool ( NotSupported) DecodeBoolean(dst []byte, src []byte) ([]byte, error) ( NotSupported) DecodeByteArray(dst []byte, src []byte, offsets []uint32) ([]byte, []uint32, error) ( NotSupported) DecodeDouble(dst []float64, src []byte) ([]float64, error) ( NotSupported) DecodeFixedLenByteArray(dst []byte, src []byte, size int) ([]byte, error) ( NotSupported) DecodeFloat(dst []float32, src []byte) ([]float32, error) ( NotSupported) DecodeInt32(dst []int32, src []byte) ([]int32, error) ( NotSupported) DecodeInt64(dst []int64, src []byte) ([]int64, error) ( NotSupported) DecodeInt96(dst []deprecated.Int96, src []byte) ([]deprecated.Int96, error) ( NotSupported) DecodeLevels(dst []uint8, src []byte) ([]uint8, error) ( NotSupported) EncodeBoolean(dst []byte, src []byte) ([]byte, error) ( NotSupported) EncodeByteArray(dst []byte, src []byte, offsets []uint32) ([]byte, error) ( NotSupported) EncodeDouble(dst []byte, src []float64) ([]byte, error) ( NotSupported) EncodeFixedLenByteArray(dst []byte, src []byte, size int) ([]byte, error) ( NotSupported) EncodeFloat(dst []byte, src []float32) ([]byte, error) ( NotSupported) EncodeInt32(dst []byte, src []int32) ([]byte, error) ( NotSupported) EncodeInt64(dst []byte, src []int64) ([]byte, error) ( NotSupported) EncodeInt96(dst []byte, src []deprecated.Int96) ([]byte, error) ( NotSupported) EncodeLevels(dst []byte, src []uint8) ([]byte, error) ( NotSupported) Encoding() format.Encoding ( NotSupported) EstimateDecodeByteArraySize(src []byte) int ( NotSupported) String() string NotSupported : Encoding NotSupported : expvar.Var NotSupported : fmt.Stringer
(*Values) Boolean() []byte (*Values) ByteArray() (data []byte, offsets []uint32) (*Values) Data() (data []byte, offsets []uint32) (*Values) Double() []float64 (*Values) FixedLenByteArray() (data []byte, size int) (*Values) Float() []float32 (*Values) Int32() []int32 (*Values) Int64() []int64 (*Values) Int96() []deprecated.Int96 (*Values) Kind() Kind (*Values) Size() int64 (*Values) Uint128() [][16]byte (*Values) Uint32() []uint32 (*Values) Uint64() []uint64 func BooleanValues(values []byte) Values func ByteArrayValues(values []byte, offsets []uint32) Values func DecodeBoolean(dst Values, src []byte, enc Encoding) (Values, error) func DecodeByteArray(dst Values, src []byte, enc Encoding) (Values, error) func DecodeDouble(dst Values, src []byte, enc Encoding) (Values, error) func DecodeFixedLenByteArray(dst Values, src []byte, enc Encoding) (Values, error) func DecodeFloat(dst Values, src []byte, enc Encoding) (Values, error) func DecodeInt32(dst Values, src []byte, enc Encoding) (Values, error) func DecodeInt64(dst Values, src []byte, enc Encoding) (Values, error) func DecodeInt96(dst Values, src []byte, enc Encoding) (Values, error) func DoubleValues(values []float64) Values func DoubleValuesFromBytes(values []byte) Values func FixedLenByteArrayValues(values []byte, size int) Values func FloatValues(values []float32) Values func FloatValuesFromBytes(values []byte) Values func Int32Values(values []int32) Values func Int32ValuesFromBytes(values []byte) Values func Int64Values(values []int64) Values func Int64ValuesFromBytes(values []byte) Values func Int96Values(values []deprecated.Int96) Values func Int96ValuesFromBytes(values []byte) Values func Uint128Values(values [][16]byte) Values func Uint32Values(values []uint32) Values func Uint64Values(values []uint64) Values func github.com/parquet-go/parquet-go.Page.Data() Values func github.com/parquet-go/parquet-go.Type.Decode(dst Values, src []byte, enc Encoding) (Values, error) func github.com/parquet-go/parquet-go.Type.NewValues(values []byte, offsets []uint32) Values func DecodeBoolean(dst Values, src []byte, enc Encoding) (Values, error) func DecodeByteArray(dst Values, src []byte, enc Encoding) (Values, error) func DecodeDouble(dst Values, src []byte, enc Encoding) (Values, error) func DecodeFixedLenByteArray(dst Values, src []byte, enc Encoding) (Values, error) func DecodeFloat(dst Values, src []byte, enc Encoding) (Values, error) func DecodeInt32(dst Values, src []byte, enc Encoding) (Values, error) func DecodeInt64(dst Values, src []byte, enc Encoding) (Values, error) func DecodeInt96(dst Values, src []byte, enc Encoding) (Values, error) func EncodeBoolean(dst []byte, src Values, enc Encoding) ([]byte, error) func EncodeByteArray(dst []byte, src Values, enc Encoding) ([]byte, error) func EncodeDouble(dst []byte, src Values, enc Encoding) ([]byte, error) func EncodeFixedLenByteArray(dst []byte, src Values, enc Encoding) ([]byte, error) func EncodeFloat(dst []byte, src Values, enc Encoding) ([]byte, error) func EncodeInt32(dst []byte, src Values, enc Encoding) ([]byte, error) func EncodeInt64(dst []byte, src Values, enc Encoding) ([]byte, error) func EncodeInt96(dst []byte, src Values, enc Encoding) ([]byte, error) func github.com/parquet-go/parquet-go.Type.Decode(dst Values, src []byte, enc Encoding) (Values, error) func github.com/parquet-go/parquet-go.Type.Encode(dst []byte, src Values, enc Encoding) ([]byte, error) func github.com/parquet-go/parquet-go.Type.NewDictionary(columnIndex, numValues int, data Values) parquet.Dictionary func github.com/parquet-go/parquet-go.Type.NewPage(columnIndex, numValues int, data Values) parquet.Page
Package-Level Functions (total 45)
func BooleanValues(values []byte) Values
func ByteArrayValues(values []byte, offsets []uint32) Values
CanEncodeBoolean reports whether e can encode BOOLEAN values.
CanEncodeByteArray reports whether e can encode BYTE_ARRAY values.
CanEncodeDouble reports whether e can encode DOUBLE values.
CanEncodeFixedLenByteArray reports whether e can encode FIXED_LEN_BYTE_ARRAY values.
CanEncodeFloat reports whether e can encode FLOAT values.
CanEncodeInt32 reports whether e can encode INT32 values.
CanEncodeInt64 reports whether e can encode INT64 values.
CanEncodeInt96 reports whether e can encode INT96 values.
CanEncodeInt8 reports whether e can encode LEVELS values.
func DecodeBoolean(dst Values, src []byte, enc Encoding) (Values, error)
func DecodeByteArray(dst Values, src []byte, enc Encoding) (Values, error)
func DecodeDouble(dst Values, src []byte, enc Encoding) (Values, error)
func DecodeFloat(dst Values, src []byte, enc Encoding) (Values, error)
func DecodeInt32(dst Values, src []byte, enc Encoding) (Values, error)
func DecodeInt64(dst Values, src []byte, enc Encoding) (Values, error)
func DecodeInt96(dst Values, src []byte, enc Encoding) (Values, error)
func DoubleValues(values []float64) Values
func EncodeBoolean(dst []byte, src Values, enc Encoding) ([]byte, error)
func EncodeByteArray(dst []byte, src Values, enc Encoding) ([]byte, error)
func EncodeDouble(dst []byte, src Values, enc Encoding) ([]byte, error)
func EncodeFloat(dst []byte, src Values, enc Encoding) ([]byte, error)
func EncodeInt32(dst []byte, src Values, enc Encoding) ([]byte, error)
func EncodeInt64(dst []byte, src Values, enc Encoding) ([]byte, error)
func EncodeInt96(dst []byte, src Values, enc Encoding) ([]byte, error)
ErrDecodeInvalidInputSize constructs an error indicating that decoding failed due to the size of the input.
ErrEncodeInvalidInputSize constructs an error indicating that encoding failed due to the size of the input.
Error constructs an error which wraps err and indicates that it originated from the given encoding.
Errorf is like Error but constructs the error message from the given format and arguments.
func FixedLenByteArrayValues(values []byte, size int) Values
func FloatValues(values []float32) Values
func Int32Values(values []int32) Values
func Int64Values(values []int64) Values
func Uint128Values(values [][16]byte) Values
func Uint32Values(values []uint32) Values
func Uint64Values(values []uint64) Values
Package-Level Variables (total 2)
ErrInvalidArgument is an error returned one or more arguments passed to the encoding functions are incorrect. As with ErrNotSupported, this error may be wrapped with specific information about the problem and applications are expected to use errors.Is for comparisons.
ErrNotSupported is an error returned when the underlying encoding does not support the type of values being encoded or decoded. This error may be wrapped with type information, applications must use errors.Is rather than equality comparisons to test the error values returned by encoders and decoders.
Package-Level Constants (total 10)
const Boolean Kind = 1
const ByteArray Kind = 7
const Double Kind = 6
const Float Kind = 5
const Int32 Kind = 2
const Int64 Kind = 3
const Int96 Kind = 4
const Undefined Kind = 0