Lebicon is a crate for encoding or decoding integers in LEB128 format.
This is accomplished by implementing the codicon
traits for all of Rust's
built-in integer types.
Install
Run this command:
$ cargo add lebicon
Examples
extern crate codicon;
extern crate lebicon;
use ;
use Leb128;
use Write;
let encoded = ;
let decoded = 268435142u64;
let value = u64 decode.unwrap;
assert_eq!;
let mut value: = Vec new;
decoded.encode.unwrap;
assert_eq!;