Skip to main content

CompressionSimulator

Trait CompressionSimulator 

Source
pub trait CompressionSimulator {
    // Required methods
    fn simulate(
        &self,
        cover: CoverMedia,
        platform: &PlatformProfile,
    ) -> Result<CoverMedia, AdaptiveError>;
    fn survivable_capacity(
        &self,
        cover: &CoverMedia,
        platform: &PlatformProfile,
    ) -> Result<Capacity, AdaptiveError>;
}
Expand description

Compression survivability port — social media platform recompression.

Required Methods§

Source

fn simulate( &self, cover: CoverMedia, platform: &PlatformProfile, ) -> Result<CoverMedia, AdaptiveError>

Simulate a target platform’s recompression pipeline on cover.

§Errors

Returns AdaptiveError::CompressionSimFailed.

Source

fn survivable_capacity( &self, cover: &CoverMedia, platform: &PlatformProfile, ) -> Result<Capacity, AdaptiveError>

Estimate the embedding capacity that survives platform’s pipeline.

§Errors

Returns AdaptiveError::CompressionSimFailed.

Implementors§