use sylpheed_formats::mesh::{debug_resource_params, debug_vertex_run_starts};
fn main() {
    let a: Vec<String> = std::env::args().collect();
    let bytes = std::fs::read(&a[1]).unwrap();
    let (markers, stride) = debug_resource_params(&bytes, &a[2]).expect("resource");
    println!("{}: stride={stride} markers={markers:?}", a[2]);
    let starts = debug_vertex_run_starts(&bytes, stride);
    println!("{} candidate starts at stride {stride}", starts.len());
    for off in &a[3..] {
        let o = usize::from_str_radix(off.trim_start_matches("0x"), 16).unwrap();
        println!("  0x{o:x} in candidate list: {}", starts.binary_search(&o).is_ok());
    }
}
