pub struct FsstArray { /* private fields */ }Expand description
A wrapper around a FsstArray that provides a reference to the compressor.
Implementations§
Source§impl FsstArray
impl FsstArray
Sourcepub fn from_parts(
compressed: BinaryArray,
compressor: Arc<Compressor>,
uncompressed_bytes: usize,
) -> Self
pub fn from_parts( compressed: BinaryArray, compressor: Arc<Compressor>, uncompressed_bytes: usize, ) -> Self
Creates a new FsstArray from a BinaryArray, a compressor, and an uncompressed length.
Sourcepub fn train_compressor<'a>(input: impl Iterator<Item = &'a [u8]>) -> Compressor
pub fn train_compressor<'a>(input: impl Iterator<Item = &'a [u8]>) -> Compressor
Trains a compressor on a sequence of strings.
Sourcepub fn from_decimal128_array_with_compressor(
array: &Decimal128Array,
compressor: Arc<Compressor>,
) -> Self
pub fn from_decimal128_array_with_compressor( array: &Decimal128Array, compressor: Arc<Compressor>, ) -> Self
Creates a new FsstArray from a Decimal128Array and a Compressor
Sourcepub fn from_decimal256_array_with_compressor(
array: &Decimal256Array,
compressor: Arc<Compressor>,
) -> Self
pub fn from_decimal256_array_with_compressor( array: &Decimal256Array, compressor: Arc<Compressor>, ) -> Self
Creates a new FsstArray from a Decimal256Array and a Compressor
Sourcepub fn to_decimal128_array(
&self,
data_type: &ArrowFixedLenByteArrayType,
) -> Decimal128Array
pub fn to_decimal128_array( &self, data_type: &ArrowFixedLenByteArrayType, ) -> Decimal128Array
Converts the FsstArray to a Decimal128Array.
Sourcepub fn to_decimal256_array(
&self,
data_type: &ArrowFixedLenByteArrayType,
) -> Decimal256Array
pub fn to_decimal256_array( &self, data_type: &ArrowFixedLenByteArrayType, ) -> Decimal256Array
Converts the FsstArray to a Decimal256Array.
Sourcepub fn from_byte_array_with_compressor<T: ByteArrayType>(
input: &GenericByteArray<T>,
compressor: Arc<Compressor>,
) -> Self
pub fn from_byte_array_with_compressor<T: ByteArrayType>( input: &GenericByteArray<T>, compressor: Arc<Compressor>, ) -> Self
Creates a new FsstArray from a GenericByteArray and a compressor
Sourcepub fn get_array_memory_size(&self) -> usize
pub fn get_array_memory_size(&self) -> usize
Returns the memory size of the FsstArray.
Sourcepub fn uncompressed_bytes(&self) -> usize
pub fn uncompressed_bytes(&self) -> usize
Returns the uncompressed length of the FsstArray.
Sourcepub fn compressed(&self) -> &BinaryArray
pub fn compressed(&self) -> &BinaryArray
Returns the compressed array.
Sourcepub fn to_arrow_byte_array<T: ByteArrayType>(&self) -> GenericByteArray<T>
pub fn to_arrow_byte_array<T: ByteArrayType>(&self) -> GenericByteArray<T>
Converts the FsstArray to a GenericByteArray.
Sourcepub fn decompressor(&self) -> Decompressor<'_>
pub fn decompressor(&self) -> Decompressor<'_>
Returns a decompressor for the FsstArray.
Sourcepub fn compressor(&self) -> &Compressor
pub fn compressor(&self) -> &Compressor
Returns a reference to the compressor.
Sourcepub fn from_bytes(bytes: Bytes, compressor: Arc<Compressor>) -> Self
pub fn from_bytes(bytes: Bytes, compressor: Arc<Compressor>) -> Self
Deserializes a FsstArray from a byte buffer.
Sourcepub fn save_symbol_table(
compressor: Arc<Compressor>,
buffer: &mut Vec<u8>,
) -> Result<()>
pub fn save_symbol_table( compressor: Arc<Compressor>, buffer: &mut Vec<u8>, ) -> Result<()>
Saves symbol table from the compressor to a buffer. The format of the saved buffer is:
- The first byte is the length of the symbol table as a u8.
- The next bytes are the lengths of each symbol as u8.
- The next bytes are the symbols as u64.
Sourcepub fn load_symbol_table(data: Bytes) -> Result<Compressor>
pub fn load_symbol_table(data: Bytes) -> Result<Compressor>
Loads the symbol table from bytes and rebuilds the compressor.
Uses the same format as the one saved by save_symbol_table().
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FsstArray
impl RefUnwindSafe for FsstArray
impl Send for FsstArray
impl Sync for FsstArray
impl Unpin for FsstArray
impl UnsafeUnpin for FsstArray
impl UnwindSafe for FsstArray
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request