reading/reading.rs
1use std::fs::File;
2use std::io::BufReader;
3
4fn main() {
5 let file = File::open("tests/swfs/SimpleRedBackground.swf").unwrap();
6 let reader = BufReader::new(file);
7 let swf_buf = swf::decompress_swf(reader).unwrap();
8 let swf = swf::parse_swf(&swf_buf).unwrap();
9 println!("The SWF has {} frame(s).", swf.header.num_frames());
10 println!("The SWF has {} tag(s).", swf.tags.len());
11}