pub enum CompressionType {
None,
Zstd,
Lz4,
}Expand description
Compression algorithm applied to Arrow IPC record batches sent over gRPC.
Compression is negotiated per-stream: the server applies the chosen codec
when encoding IPC buffers with FlightDataEncoderBuilder.
§Choosing a codec
- Use
Zstdfor most deployments — it offers the best size/CPU tradeoff for typical columnar workloads and is the default. - Use
Lz4when the client is CPU-constrained and decompression speed matters more than wire size. - Use
Noneon loopback / LAN links where network bandwidth is not a bottleneck and you want zero codec overhead.
Variants§
None
No compression. Zero CPU cost; highest wire size.
Suitable for loopback or high-bandwidth LAN deployments where encoding overhead outweighs any bandwidth saving.
Zstd
Zstandard compression (the default).
Best size/CPU tradeoff for typical columnar Arrow workloads. Zstd achieves higher compression ratios than LZ4 at comparable or lower decompression cost, making it the right default for most deployments.
Lz4
LZ4 (frame format) compression.
Faster decompression than Zstd at the cost of a larger wire footprint. Prefer this when the client is CPU-constrained and decompression speed is more important than reducing bytes on the wire.
Trait Implementations§
Source§impl Clone for CompressionType
impl Clone for CompressionType
Source§fn clone(&self) -> CompressionType
fn clone(&self) -> CompressionType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompressionType
impl Debug for CompressionType
impl Copy for CompressionType
Auto Trait Implementations§
impl Freeze for CompressionType
impl RefUnwindSafe for CompressionType
impl Send for CompressionType
impl Sync for CompressionType
impl Unpin for CompressionType
impl UnsafeUnpin for CompressionType
impl UnwindSafe for CompressionType
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,
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