Enum opendal::raw::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::raw::CompressAlgorithm;
use opendal::raw::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§
source§impl Debug for DecompressCodec
impl Debug for DecompressCodec
source§impl Decode for DecompressCodec
impl Decode for DecompressCodec
source§fn reinit(&mut self) -> Result<()>
fn reinit(&mut self) -> Result<()>
Reinitializes this decoder ready to decode a new member/frame of data.
source§fn 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
source§impl From<CompressAlgorithm> for DecompressCodec
impl From<CompressAlgorithm> for DecompressCodec
source§fn from(v: CompressAlgorithm) -> Self
fn from(v: CompressAlgorithm) -> Self
Converts to this type from the input type.