pub enum Compression {
UNCOMPRESSED,
SNAPPY,
GZIP(GzipLevel),
LZO,
BROTLI(BrotliLevel),
LZ4,
ZSTD(ZstdLevel),
LZ4_RAW,
}
Expand description
Supported block compression algorithms.
Block compression can yield non-trivial improvements to storage efficiency at the expense of potentially significantly worse encode and decode performance. Many applications, especially those making use of high-throughput and low-cost commodity object storage, may find storage efficiency less important than decode throughput, and therefore may wish to not make use of block compression.
The writers in this crate default to no block compression for this reason.
Applications that do still wish to use block compression, will find Compression::ZSTD
to provide a good balance of compression, performance, and ecosystem support. Alternatively,
Compression::LZ4_RAW
provides much faster decompression speeds, at the cost of typically
worse compression ratios. However, it is not as widely supported by the ecosystem, with the
Hadoop ecosystem historically favoring the non-standard and now deprecated Compression::LZ4
.
Variants§
UNCOMPRESSED
No compression.
SNAPPY
GZIP(GzipLevel)
LZO
BROTLI(BrotliLevel)
LZ4
ZSTD(ZstdLevel)
LZ4_RAW
Implementations§
Source§impl Compression
impl Compression
Sourcepub(crate) fn codec_to_string(self) -> String
pub(crate) fn codec_to_string(self) -> String
Returns the codec type of this compression setting as a string, without the compression level.
Trait Implementations§
Source§impl Clone for Compression
impl Clone for Compression
Source§fn clone(&self) -> Compression
fn clone(&self) -> Compression
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for Compression
impl Debug for Compression
Source§impl Display for Compression
impl Display for Compression
Source§impl From<Compression> for CompressionCodec
impl From<Compression> for CompressionCodec
Source§fn from(value: Compression) -> Self
fn from(value: Compression) -> Self
Source§impl FromStr for Compression
impl FromStr for Compression
Source§impl HeapSize for Compression
impl HeapSize for Compression
Source§impl PartialEq for Compression
impl PartialEq for Compression
Source§impl TryFrom<CompressionCodec> for Compression
impl TryFrom<CompressionCodec> for Compression
Source§type Error = ParquetError
type Error = ParquetError
Source§fn try_from(value: CompressionCodec) -> Result<Self>
fn try_from(value: CompressionCodec) -> Result<Self>
impl Copy for Compression
impl Eq for Compression
impl StructuralPartialEq for Compression
Auto Trait Implementations§
impl Freeze for Compression
impl RefUnwindSafe for Compression
impl Send for Compression
impl Sync for Compression
impl Unpin for Compression
impl UnwindSafe for Compression
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
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
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 more