Enum CompressionMethod

enum CompressionMethod

Identifies the storage format used to compress a file within a ZIP archive.

Each file's compression method is stored alongside it, allowing the contents to be read without context.

When creating ZIP files, you may choose the method to use with crate::write::FileOptions::compression_method

Variants

Stored

Store the file as is

Deflated

Compress the file using Deflate

Deflate64

Compress the file using Deflate64. Decoding deflate64 is supported but encoding deflate64 is not supported.

Bzip2

Compress the file using BZIP2

Aes

Encrypted using AES.

The actual compression method has to be taken from the AES extra data field or from ZipFileData.

Zstd

Compress the file using ZStandard

Lzma

Compress the file using LZMA

Xz

Compress the file using XZ

Ppmd

Compress the file using PPMd

Unsupported(u16)

Unsupported compression method

Implementations

impl CompressionMethod

const fn from_u16(val: u16) -> CompressionMethod

Converts a u16 to its corresponding CompressionMethod

const fn to_u16(self: Self) -> u16

Converts a CompressionMethod to a u16

impl CompressionMethod

impl Clone for CompressionMethod

fn clone(self: &Self) -> CompressionMethod

impl Copy for CompressionMethod

impl Debug for CompressionMethod

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Default for CompressionMethod

fn default() -> Self

impl Display for CompressionMethod

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Eq for CompressionMethod

impl Freeze for CompressionMethod

impl PartialEq for CompressionMethod

fn eq(self: &Self, other: &CompressionMethod) -> bool

impl RefUnwindSafe for CompressionMethod

impl Send for CompressionMethod

impl StructuralPartialEq for CompressionMethod

impl Sync for CompressionMethod

impl Unpin for CompressionMethod

impl UnsafeUnpin for CompressionMethod

impl UnwindSafe for CompressionMethod

impl<Q, K> Equivalent for CompressionMethod

fn equivalent(self: &Self, key: &K) -> bool

impl<Q, K> Equivalent for CompressionMethod

fn equivalent(self: &Self, key: &K) -> bool

impl<T> Any for CompressionMethod

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for CompressionMethod

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for CompressionMethod

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for CompressionMethod

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for CompressionMethod

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Same for CompressionMethod

impl<T> ToOwned for CompressionMethod

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T> ToString for CompressionMethod

fn to_string(self: &Self) -> String

impl<T, U> Into for CompressionMethod

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for CompressionMethod

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for CompressionMethod

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>