pub enum CompressionCodec {
Lz4Frame,
Zstd,
}
Expand description
Represents compressing a ipc stream using a particular compression algorithm
Variants§
Implementations§
Source§impl CompressionCodec
impl CompressionCodec
Sourcepub(crate) fn compress_to_vec(
&self,
input: &[u8],
output: &mut Vec<u8>,
) -> Result<usize, ArrowError>
pub(crate) fn compress_to_vec( &self, input: &[u8], output: &mut Vec<u8>, ) -> Result<usize, ArrowError>
Compresses the data in input
to output
and appends the
data using the specified compression mechanism.
returns the number of bytes written to the stream
Writes this format to output:
[8 bytes]: uncompressed length
[remaining bytes]: compressed data stream
Sourcepub(crate) fn decompress_to_buffer(
&self,
input: &Buffer,
) -> Result<Buffer, ArrowError>
pub(crate) fn decompress_to_buffer( &self, input: &Buffer, ) -> Result<Buffer, ArrowError>
Decompresses the input into a [Buffer
]
The input should look like:
[8 bytes]: uncompressed length
[remaining bytes]: compressed data stream
Trait Implementations§
Source§impl Clone for CompressionCodec
impl Clone for CompressionCodec
Source§fn clone(&self) -> CompressionCodec
fn clone(&self) -> CompressionCodec
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CompressionCodec
impl Debug for CompressionCodec
Source§impl PartialEq for CompressionCodec
impl PartialEq for CompressionCodec
Source§impl TryFrom<CompressionType> for CompressionCodec
impl TryFrom<CompressionType> for CompressionCodec
impl Copy for CompressionCodec
impl Eq for CompressionCodec
impl StructuralPartialEq for CompressionCodec
Auto Trait Implementations§
impl Freeze for CompressionCodec
impl RefUnwindSafe for CompressionCodec
impl Send for CompressionCodec
impl Sync for CompressionCodec
impl Unpin for CompressionCodec
impl UnwindSafe for CompressionCodec
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more