Varint-rs
[API Documentation]
##Variable-length integer implementation in Rust
###Notes for 0.9
- Reading and writing 64-bit Varints is currently unsupported, but will be added in 1.0 after testing current functionality
- If you're using the io-operations feature for IoOperations 0.2 integration, please note that it will be refactored in the next release.
- Real-world tests are still in progress. Theoretically, however, everything should work.
###List of feature flags
io-operations
- Preliminary integration with the IO-Operations library
###Examples
extern crate varint;
use ; //Using IO-Operations? Replace with VarintReader and VarintWriter, the functions are the same
use Cursor; //Currently supports Cursor<Vec<u8>> and TcpStream, but should be okay to implement in any Read/Write trait
let mut vector = new;
assert!; //You can check this however you like. Try! could work. I'll check it out in Netherrack and update this by 1.0
//Do whatever you need to do.
vector.set_position; //If you're using a TcpStream, you'd probably switch sides and into a different codebase. This is just a quick example before I fall asleep :)
assert_eq!; //You could also use try! here. Again, I'll test it in a real world project and update later