Skip to main content

mlt_core/encoder/stream/
physical.rs

1use crate::decoder::PhysicalEncoding;
2use crate::{MltError, MltResult};
3
4impl PhysicalEncoding {
5    pub fn parse(value: u8) -> MltResult<Self> {
6        Self::try_from(value).or(Err(MltError::ParsingPhysicalEncoding(value)))
7    }
8}
9
10#[derive(Debug, Clone, Copy, PartialEq, Eq, strum::EnumIter)]
11#[cfg_attr(test, derive(proptest_derive::Arbitrary))]
12#[cfg_attr(all(not(test), feature = "arbitrary"), derive(arbitrary::Arbitrary))]
13pub enum PhysicalEncoder {
14    None,
15    /// Can produce better results in combination with a heavyweight compression scheme like `Gzip`.
16    /// Simple compression scheme where the encoding is easier to implement compared to `FastPFOR`.
17    VarInt,
18    /// Preferred, tends to produce the best compression ratio and decoding performance.
19    ///
20    /// Does not support u64/i64 integers
21    FastPFOR,
22}