Crates.io | leb128-u64 |
lib.rs | leb128-u64 |
version | 0.1.1 |
source | src |
created_at | 2023-05-08 14:17:07.631728 |
updated_at | 2023-05-08 18:03:52.576769 |
description | Extremely minimal and simple LEB128 u64 encoding/decoding |
homepage | |
repository | https://github.com/tokarevart/leb128-u64 |
max_upload_size | |
id | 859842 |
size | 5,236 |
Extremely minimal and simple LEB128 u64
encoding/decoding.
let input: u64 = 42;
let mut buf = Vec::new();
leb128_u64::encode(input, &mut buf);
assert_eq!(leb128_u64::encoded_len(input), buf.len());
let output = leb128_u64::decode(&buf[..]);
assert_eq!(input, output);