spinifex-unsigned-varint
Implementation of the unsigned variable integer type used in multiformats
Table of Contents
Install
$ git clone git@github.com:jmcph4/spinifex-unsigned-varint.git
$ cd spinifex-unsigned-varint
$ cargo build
Usage
/* initialise from native integer types */
let some_number: u128 = 128;
let my_uvarint: UVarInt = new;
/* encode into byte vector */
let my_uvarint_bytes: = my_uvarint
println!; /* "[128, 1]" */
/* decode from byte vector */
let my_other_uvarint_bytes: = vec!;
let my_other_uvarint: UVarInt = from_bytes.unwrap;
println!; /* "uv16384" */
Maintainers
Contributing
Small note: If editing the README, please conform to the standard-readme specification.
License
MIT © 2020 Jack McPherson