github.com/vc42/parquet-go@v0.0.0-20240320194221-1a9adb5f23f5/encoding/plain/dictionary.go (about)

     1  package plain
     2  
     3  import (
     4  	"github.com/vc42/parquet-go/encoding"
     5  	"github.com/vc42/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, src []byte) ([]byte, error) {
    22  	return e.plain.EncodeInt32(dst, src)
    23  }
    24  
    25  func (e *DictionaryEncoding) DecodeInt32(dst, src []byte) ([]byte, error) {
    26  	return e.plain.DecodeInt32(dst, src)
    27  }