github.com/parquet-go/parquet-go@v0.20.0/encoding/plain/dictionary.go (about)

     1  package plain
     2  
     3  import (
     4  	"github.com/parquet-go/parquet-go/encoding"
     5  	"github.com/parquet-go/parquet-go/format"
     6  )
     7  
     8  type DictionaryEncoding struct {
     9  	encoding.NotSupported
    10  	plain Encoding
    11  }
    12  
    13  func (e *DictionaryEncoding) String() string {
    14  	return "PLAIN_DICTIONARY"
    15  }
    16  
    17  func (e *DictionaryEncoding) Encoding() format.Encoding {
    18  	return format.PlainDictionary
    19  }
    20  
    21  func (e *DictionaryEncoding) EncodeInt32(dst []byte, src []int32) ([]byte, error) {
    22  	return e.plain.EncodeInt32(dst, src)
    23  }
    24  
    25  func (e *DictionaryEncoding) DecodeInt32(dst []int32, src []byte) ([]int32, error) {
    26  	return e.plain.DecodeInt32(dst, src)
    27  }