rust version iterator based, 3.5 MB memory turning 5 GB frames to files on disk, 10MiB/second

This commit is contained in:
Alon Levy
2023-12-31 01:20:44 +02:00
parent ade93550ad
commit 5f5834835c
3 changed files with 131 additions and 90 deletions

View File

@@ -1,11 +1,12 @@
use thermaldecoder::decode_raw;
use thermaldecoder::decode_to_files;
use std::env;
fn main() -> anyhow::Result<()> {
let mut arg = env::args();
arg.next(); // skip executable
let filename = arg.next().ok_or(anyhow::anyhow!("unexpected"))?;
let frames = arg.next().unwrap_or("frames".into());
decode_raw(&filename, &frames)?;
decode_to_files(&filename, &frames)?;
Ok(())
}