mirx 0.45.0

MIRX binary image format — flat & chunk-based container for ahead-of-time UI assets
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use mirx::{
    coding::{CodingRecord, CodingTable},
    image::{EncodedImageAsset, SurfaceDescriptor},
};

fn retained<'a>(surface: SurfaceDescriptor, table: CodingTable<'a>, data: &'a [u8]) {
    let _ = EncodedImageAsset::from_codings(surface, table, data);
}

fn main() {
    let mut bytes = [0; 12];
    let _ = CodingTable::open(&bytes);
    let _ = CodingTable::encoded_len(&[CodingRecord::RAW]);
    let _ = CodingTable::encode_into(&[CodingRecord::RAW], &mut bytes);
}