Enum opendal::raw::CompressAlgorithm
source · pub enum CompressAlgorithm {
Brotli,
Bz2,
Deflate,
Gzip,
Lzma,
Xz,
Zlib,
Zstd,
}
Expand description
CompressAlgorithm represents all compress algorithm that OpenDAL supports.
Variants§
Brotli
Brotli compression format.
Bz2
bzip2 compression format.
Deflate
Deflate Compressed Data Format.
Similar to CompressAlgorithm::Gzip
and CompressAlgorithm::Zlib
Gzip
Gzip compress format.
Similar to CompressAlgorithm::Deflate
and CompressAlgorithm::Zlib
Lzma
LZMA compress format.
Xz
Xz compress format, the successor of CompressAlgorithm::Lzma
.
Zlib
Zlib compress format.
Similar to CompressAlgorithm::Deflate
and CompressAlgorithm::Gzip
Zstd
Zstd compression algorithm
Implementations§
source§impl CompressAlgorithm
impl CompressAlgorithm
sourcepub fn from_extension(ext: &str) -> Option<CompressAlgorithm>
pub fn from_extension(ext: &str) -> Option<CompressAlgorithm>
Create CompressAlgorithm from file extension.
If the file extension is not supported, None
will be return instead.
sourcepub fn from_path(path: &str) -> Option<CompressAlgorithm>
pub fn from_path(path: &str) -> Option<CompressAlgorithm>
Create CompressAlgorithm from file path.
If the extension in file path is not supported, None
will be return instead.
Trait Implementations§
source§impl Clone for CompressAlgorithm
impl Clone for CompressAlgorithm
source§fn clone(&self) -> CompressAlgorithm
fn clone(&self) -> CompressAlgorithm
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 CompressAlgorithm
impl Debug for CompressAlgorithm
source§impl<'de> Deserialize<'de> for CompressAlgorithm
impl<'de> Deserialize<'de> for CompressAlgorithm
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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.
source§impl PartialEq<CompressAlgorithm> for CompressAlgorithm
impl PartialEq<CompressAlgorithm> for CompressAlgorithm
source§fn eq(&self, other: &CompressAlgorithm) -> bool
fn eq(&self, other: &CompressAlgorithm) -> bool
source§impl Serialize for CompressAlgorithm
impl Serialize for CompressAlgorithm
impl Copy for CompressAlgorithm
impl Eq for CompressAlgorithm
impl StructuralEq for CompressAlgorithm
impl StructuralPartialEq for CompressAlgorithm
Auto Trait Implementations§
impl RefUnwindSafe for CompressAlgorithm
impl Send for CompressAlgorithm
impl Sync for CompressAlgorithm
impl Unpin for CompressAlgorithm
impl UnwindSafe for CompressAlgorithm
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.