diff --git a/README.md b/README.md index 918eba2..ebdf7a7 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,11 @@ use strafesnet_roblox_bot_file::{File,TimedBlockId}; let file=std::fs::File::open("bot_file")?; let input=std::io::BufReader::new(file); let mut bot_file=File::new(input)?; + +// read the whole file +let block=bot_file.read_all()?; + +// or do data streaming block by block for &TimedBlockId{time,block_id} in &bot_file.header.offline_blocks_timeline{ // header is immutably borrowed // while data is mutably borrowed