Add to Cargo.toml:
[dependencies]
etc-rs = { git = "https://github.com/superp00t/etc-rs.git", branch = "master" }
main.rs:
extern crate etc_rs;
use etc_rs::buffer::Buffer;
fn main() {
// Create buffer in memory
let mut buf = Buffer::new();
// Create buffer as an alias to a file
let mut buf = Buffer::from_file("/tmp/testingData");
// Write some data
buf.write(&[1, 2, 3, 4, 5]);
// Write signed 64-bit integer using LEB128 compression
buf.write_i(12345678);
}