Skip to content

A Rust crate that implements LEB128 encoding and decoding

License

Notifications You must be signed in to change notification settings

npmccallum/lebicon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A Rust crate that implements LEB128 encoding and decoding

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages