Trait parquet::encoding::Encoder [−][src]
pub trait Encoder<T: DataType> { fn put(&mut self, values: &[T::T]) -> Result<()>; fn encoding(&self) -> Encoding; fn estimated_data_encoded_size(&self) -> usize; fn flush_buffer(&mut self) -> Result<ByteBufferPtr>; fn put_spaced(
&mut self,
values: &[T::T],
valid_bits: &[u8]
) -> Result<usize> { ... } }
Expand description
An Parquet encoder for the data type T
.
Currently this allocates internal buffers for the encoded values. After done putting
values, caller should call flush_buffer()
to get an immutable buffer pointer.
Required methods
fn put(&mut self, values: &[T::T]) -> Result<()>
[src]
fn put(&mut self, values: &[T::T]) -> Result<()>
[src]Encodes data from values
.
fn encoding(&self) -> Encoding
[src]
fn encoding(&self) -> Encoding
[src]Returns the encoding type of this encoder.
fn estimated_data_encoded_size(&self) -> usize
[src]
fn estimated_data_encoded_size(&self) -> usize
[src]Returns an estimate of the encoded data, in bytes. Method call must be O(1).
fn flush_buffer(&mut self) -> Result<ByteBufferPtr>
[src]
fn flush_buffer(&mut self) -> Result<ByteBufferPtr>
[src]Flushes the underlying byte buffer that’s being processed by this encoder, and return the immutable copy of it. This will also reset the internal state.
Provided methods
Implementors
impl<T: DataType> Encoder<T> for DeltaBitPackEncoder<T>
[src]
impl<T: DataType> Encoder<T> for DeltaBitPackEncoder<T>
[src]impl<T: DataType> Encoder<T> for DeltaByteArrayEncoder<T>
[src]
impl<T: DataType> Encoder<T> for DeltaByteArrayEncoder<T>
[src]impl<T: DataType> Encoder<T> for DeltaLengthByteArrayEncoder<T>
[src]
impl<T: DataType> Encoder<T> for DeltaLengthByteArrayEncoder<T>
[src]impl<T: DataType> Encoder<T> for DictEncoder<T>
[src]
impl<T: DataType> Encoder<T> for DictEncoder<T>
[src]impl<T: DataType> Encoder<T> for PlainEncoder<T>
[src]
impl<T: DataType> Encoder<T> for PlainEncoder<T>
[src]