lebicon

Crates.iolebicon
lib.rslebicon
version4.0.0
sourcesrc
created_at2018-10-10 21:57:01.598628
updated_at2020-09-07 20:50:20.409538
descriptionImplements codicon traits for LEB128 encoding / decoding
homepage
repositoryhttps://github.com/enarx/lebicon
max_upload_size
id89157
size25,779
Nathaniel McCallum (npmccallum)

documentation

https://docs.rs/lebicon

README

Workflow Status Average time to resolve an issue Percentage of issues still open Maintenance

lebicon

Lebicon implements the codicon traits for LEB128 encoding / decoding.

Examples

use codicon::*;
use lebicon::Leb128;

let encoded = [198, 253, 255, 127];
let decoded = 268435142u64;

let value = u64::decode(&mut &encoded[..], Leb128).unwrap();
assert_eq!(value, decoded);

let mut value: Vec<u8> = Vec::new();
decoded.encode(&mut value, Leb128).unwrap();
assert_eq!(&value[..], &encoded[..]);

License: Apache-2.0

Commit count: 27

cargo fmt