#file #parser #blockland

bin+lib bl_save

Read Blockland save files

2 unstable releases

0.2.0 Apr 19, 2019
0.1.0 Apr 14, 2019

#2139 in Encoding

MIT license

19KB
370 lines

bl_save on crates.io bl_save on docs.rs

A library for reading Blockland save files. Generally tries to work around format errors like Blockland does.

Create a Reader from a BufRead source to read the save metadata and iterate over its bricks.

let file = BufReader::new(File::open("House.bls")?);
let reader = bl_save::Reader::new(file)?;

for line in reader.description() {
    println!("{}", line);
}

assert_eq!(reader.colors().len(), 64);
println!("Brick count: {}", reader.brick_count());

for brick in reader {
    let brick = brick?;
}

lib.rs:

A library for reading Blockland save files. Generally tries to work around format errors like Blockland does.

Create a Reader from a BufRead source to read the save metadata and iterate over its bricks.

let file = BufReader::new(File::open("House.bls")?);
let reader = bl_save::Reader::new(file)?;

for line in reader.description() {
    println!("{}", line);
}

assert_eq!(reader.colors().len(), 64);
println!("Brick count: {}", reader.brick_count());

for brick in reader {
    let brick = brick?;
}

No runtime deps