Enum chd::header::CodecType

source ·
#[repr(u32)]
pub enum CodecType {
Show 14 variants None = 0, Zlib = 1, ZlibPlus = 2, AV = 3, ZLibV5 = 2_053_925_218, ZLibCdV5 = 1_667_529_324, LzmaCdV5 = 1_667_525_754, FlacCdV5 = 1_667_524_204, FlacV5 = 1_718_378_851, LzmaV5 = 1_819_962_721, AVHuffV5 = 1_635_149_941, HuffV5 = 1_752_524_390, ZstdV5 = 2_054_386_788, ZstdCdV5 = 1_667_529_331,
}
Expand description

The types of compression codecs supported in a CHD file.

Variants§

§

None = 0

No compression.

§

Zlib = 1

V1-4 Zlib DEFLATE compression.

§

ZlibPlus = 2

V1-4 Zlib+ DEFLATE compression.

§

AV = 3

V1-4 AV Huffman compression.

§

ZLibV5 = 2_053_925_218

V5 Zlib DEFLATE compression.

§

ZLibCdV5 = 1_667_529_324

V5 CD Zlib DEFLATE compression (cdzl)

§

LzmaCdV5 = 1_667_525_754

V5 CD LZMA compression (cdlz)

§

FlacCdV5 = 1_667_524_204

V5 CD FLAC compression (cdfl)

§

FlacV5 = 1_718_378_851

V5 FLAC compression (flac)

§

LzmaV5 = 1_819_962_721

V5 LZMA compression (lzma)

§

AVHuffV5 = 1_635_149_941

V5 AV/Huffman compression (avhu)

§

HuffV5 = 1_752_524_390

V5 Huffman compression (huff)

§

ZstdV5 = 2_054_386_788

V5 Zstandard compression (zstd)

§

ZstdCdV5 = 1_667_529_331

V5 Zstandard CD compression (cdzs)

Implementations§

source§

impl CodecType

source

pub const fn is_legacy(&self) -> bool

Returns whether or not the codec type is a legacy (V1-4) codec or a V5 codec.

Trait Implementations§

source§

impl Debug for CodecType

source§

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

Formats the value using the given formatter. Read more
source§

impl FromPrimitive for CodecType

source§

fn from_i64(n: i64) -> Option<Self>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_u64(n: u64) -> Option<Self>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_i128(n: i128) -> Option<Self>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_u128(n: u128) -> Option<Self>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
source§

fn from_f32(n: f32) -> Option<Self>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_f64(n: f64) -> Option<Self>

Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

source§

fn into(self) -> U

Calls U::from(self).

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

source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

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

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

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

Performs the conversion.