pub trait TileDecodeOp: Send + Sync {
// Required method
fn decode_tile(
&self,
coord: &TileCoord,
data: &[u8],
) -> CodecResult<Vec<u8>>;
}Expand description
Codec-specific tile decoding operation.
Implementors receive the compressed byte slice for one tile and return the decoded output (e.g. reconstructed pixel rows for a codec-agnostic buffer).
§Thread Safety
Implementations must be Send + Sync because decode_tiles_parallel
drives them from Rayon work-stealing iterators.
Required Methods§
Sourcefn decode_tile(&self, coord: &TileCoord, data: &[u8]) -> CodecResult<Vec<u8>>
fn decode_tile(&self, coord: &TileCoord, data: &[u8]) -> CodecResult<Vec<u8>>
Decode the byte slice data for the tile described by coord.
Returns the decoded bytes for this tile (format is op-specific).
§Errors
Return a CodecError if decoding fails.