Enum opendal::io_util::DecompressCodec
source · [−]pub enum DecompressCodec {
Brotli(Box<BrotliDecoder>),
Bz2(BzDecoder),
Deflate(DeflateDecoder),
Gzip(GzipDecoder),
Lzma(LzmaDecoder),
Xz(XzDecoder),
Zlib(ZlibDecoder),
Zstd(ZstdDecoder),
}
Expand description
DecompressDecoder contains all decoders that opendal supports.
Example
Please use CompressAlgorithm.into()
to create a new decoder
use opendal::io_util::CompressAlgorithm;
use opendal::io_util::DecompressCodec;
let de: DecompressCodec = CompressAlgorithm::Zstd.into();
Variants
Brotli(Box<BrotliDecoder>)
Decoder for CompressAlgorithm::Brotli
BrotliDecoder is too large that is 2592 bytes Wrap into box to reduce the total size of the enum
Bz2(BzDecoder)
Decoder for CompressAlgorithm::Bz2
Deflate(DeflateDecoder)
Decoder for CompressAlgorithm::Deflate
Gzip(GzipDecoder)
Decoder for CompressAlgorithm::Gzip
Lzma(LzmaDecoder)
Decoder for CompressAlgorithm::Lzma
Xz(XzDecoder)
Decoder for CompressAlgorithm::Xz
Zlib(ZlibDecoder)
Decoder for CompressAlgorithm::Zlib
Zstd(ZstdDecoder)
Decoder for CompressAlgorithm::Zstd
Trait Implementations
sourceimpl Debug for DecompressCodec
impl Debug for DecompressCodec
sourceimpl Decode for DecompressCodec
impl Decode for DecompressCodec
sourcefn reinit(&mut self) -> Result<()>
fn reinit(&mut self) -> Result<()>
Reinitializes this decoder ready to decode a new member/frame of data.
sourcefn decode(
&mut self,
input: &mut PartialBuffer<impl AsRef<[u8]>>,
output: &mut PartialBuffer<impl AsRef<[u8]> + AsMut<[u8]>>
) -> Result<bool>
fn decode(
&mut self,
input: &mut PartialBuffer<impl AsRef<[u8]>>,
output: &mut PartialBuffer<impl AsRef<[u8]> + AsMut<[u8]>>
) -> Result<bool>
Returns whether the end of the stream has been read
sourceimpl From<CompressAlgorithm> for DecompressCodec
impl From<CompressAlgorithm> for DecompressCodec
sourcefn from(v: CompressAlgorithm) -> Self
fn from(v: CompressAlgorithm) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for DecompressCodec
impl Send for DecompressCodec
impl Sync for DecompressCodec
impl Unpin for DecompressCodec
impl UnwindSafe for DecompressCodec
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more