pub struct ContentCompression {
pub crc32: Option<Crc32>,
pub void: Option<Void>,
pub content_comp_algo: ContentCompAlgo,
pub content_comp_settings: Option<ContentCompSettings>,
}Expand description
Settings describing the compression used. This Element MUST be present if the value of ContentEncodingType is 0 and absent otherwise. Each block MUST be decompressable even if no previous block is available in order not to prevent seeking.
Fields§
§crc32: Option<Crc32>Optional CRC-32 element for integrity checking.
void: Option<Void>void element, useful for reserving space during writing.
content_comp_algo: ContentCompAlgoThe compression algorithm used. Compression method “1” (bzlib) and “2” (lzo1x) are lacking proper documentation on the format which limits implementation possibilities. Due to licensing conflicts on commonly available libraries compression methods “2” (lzo1x) does not offer widespread interoperability. A Matroska Writer SHOULD NOT use these compression methods by default. A Matroska Reader MAY support methods “1” and “2” as possible, and SHOULD support other methods.
- 0 - zlib,
- 1 - bzlib,
- 2 - lzo1x,
- 3 - Header Stripping
content_comp_settings: Option<ContentCompSettings>Settings that might be needed by the decompressor. For Header Stripping (ContentCompAlgo=3), the bytes that were removed from the beginning of each frames of the track.
Trait Implementations§
Source§impl Clone for ContentCompression
impl Clone for ContentCompression
Source§fn clone(&self) -> ContentCompression
fn clone(&self) -> ContentCompression
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ContentCompression
impl Debug for ContentCompression
Source§impl Default for ContentCompression
impl Default for ContentCompression
Source§fn default() -> ContentCompression
fn default() -> ContentCompression
Source§impl Element for ContentCompression
impl Element for ContentCompression
Source§fn decode_body(buf: &mut &[u8]) -> Result<Self>
fn decode_body(buf: &mut &[u8]) -> Result<Self>
Source§fn encode_body<B: BufMut>(&self, buf: &mut B) -> Result<()>
fn encode_body<B: BufMut>(&self, buf: &mut B) -> Result<()>
Source§const HAS_DEFAULT_VALUE: bool = false
const HAS_DEFAULT_VALUE: bool = false
Source§impl PartialEq for ContentCompression
impl PartialEq for ContentCompression
impl Eq for ContentCompression
impl StructuralPartialEq for ContentCompression
Auto Trait Implementations§
impl Freeze for ContentCompression
impl RefUnwindSafe for ContentCompression
impl Send for ContentCompression
impl Sync for ContentCompression
impl Unpin for ContentCompression
impl UnwindSafe for ContentCompression
Blanket Implementations§
Source§impl<T> AsyncReadElement for Twhere
T: Element,
impl<T> AsyncReadElement for Twhere
T: Element,
Source§impl<T> AsyncReadFrom for Twhere
T: Element,
impl<T> AsyncReadFrom for Twhere
T: Element,
Source§impl<T> AsyncWriteTo for Twhere
T: Encode,
impl<T> AsyncWriteTo for Twhere
T: Encode,
Source§async fn async_write_to<W>(&self, w: &mut W) -> Result<(), Error>where
W: AsyncWrite + Unpin,
async fn async_write_to<W>(&self, w: &mut W) -> Result<(), Error>where
W: AsyncWrite + Unpin,
tokio only.