Enum Compression

#[repr(u16)]
#[non_exhaustive]
pub enum Compression

Compression

Variants

Stored = 0

Store the file as is

Shrink = 1

Method 1 Shrink

ReduceFactor1 = 2

Reduce with compression factor 1

ReduceFactor2 = 3

Reduce with compression factor 2

ReduceFactor3 = 4

Reduce with compression factor 3

ReduceFactor4 = 5

Reduce with compression factor 4

Implode = 6

Implode/explode

TokenizingCompression = 7

Reserved for Tokenizing compression algorithm

Deflated = 8

Compress the file using Deflate

Deflate64 = 9

Compress the file using Deflate64.

PkwareDataCompressionImploding = 10

PKWARE Data Compression Library Imploding (old IBM TERSE)

Reserved11 = 11

Reserved by PKWARE

Bzip2 = 12

Compress the file using BZIP2

Reserved13 = 13

Reserved by PKWARE

Lzma = 14

Compress the file using LZMA

Reserved15 = 15

Reserved by PKWARE

CmpscCompression = 16

IBM z/OS CMPSC Compression

Reserved17 = 17

Reserved by PKWARE

IbmTerseNew = 18

File is compressed using IBM TERSE (new)

IbmLz77 = 19

IBM LZ77 z Architecture

DeprecatedZstd = 20

deprecated ZSTD

Zstd = 93

Compress the file using ZStandard

Mp3 = 94

MP3 Compression

Xz = 95

Compress the file using XZ

Jpeg = 96

JPEG variant

WavPack = 97

WavPack compressed data

Ppmd = 98

Compress the file using PPMd

Aes = 99

Encrypted using AES.

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

Unknown(u16)

Unsupported compression method

Implementations

impl Compression

fn as_u16(self) -> u16

as u16

Trait Implementations

impl Clone for Compression

fn clone(&self) -> Self

impl Copy for Compression

impl Debug for Compression

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

impl Default for Compression

fn default() -> Self

impl Eq for Compression

impl From<CompressionMethod> for Compression

fn from(value: CompressionMethod) -> Self

impl From<u16> for Compression

fn from(value: u16) -> Self

impl PartialEq for Compression

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

impl StructuralPartialEq for Compression

Auto Trait Implementations

impl Freeze for Compression

impl RefUnwindSafe for Compression

impl Send for Compression

impl Sync for Compression

impl Unpin for Compression

impl UnsafeUnpin for Compression

impl UnwindSafe for Compression

Blanket Implementations

impl<Q, K> Equivalent<K> for Compression where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

impl<Q, K> Equivalent<K> for Compression where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

impl<T> Any for Compression where T: 'static + ?Sized,

impl<T> Borrow<T> for Compression where T: ?Sized,

impl<T> BorrowMut<T> for Compression where T: ?Sized,

impl<T> CloneToUninit for Compression where T: Clone,

impl<T> From<T> for Compression

impl<T> Same for Compression

impl<T> ToOwned for Compression where T: Clone,

impl<T, U> Into<U> for Compression where U: From<T>,

impl<T, U> TryFrom<U> for Compression where U: Into<T>,

impl<T, U> TryInto<U> for Compression where U: TryFrom<T>,