#byte-sequences #numbers #most #integer #wrapper #convenience #zig-zag

no-std uint-zigzag

Uint is a convenience wrapper for zig-zag encoding integers to byte sequences. This allows better compression since the majority of numbers are quite small resulting in 1 or 2 bytes in the most common case vs 4 for 32-bit numbers or 8 for 64-bit numbers. This also permits the user to not have to think about which integer type is the most efficient to compress

3 unstable releases

0.2.1 Oct 20, 2022
0.2.0 Sep 13, 2022
0.1.0 Aug 15, 2022

#367 in Compression

Download history 383/week @ 2024-03-14 967/week @ 2024-03-21 612/week @ 2024-03-28 526/week @ 2024-04-04 343/week @ 2024-04-11 406/week @ 2024-04-18 349/week @ 2024-04-25 675/week @ 2024-05-02 460/week @ 2024-05-09 542/week @ 2024-05-16 290/week @ 2024-05-23 286/week @ 2024-05-30 397/week @ 2024-06-06 551/week @ 2024-06-13 717/week @ 2024-06-20 293/week @ 2024-06-27

1,983 downloads per month
Used in 4 crates (3 directly)

Apache-2.0 OR MIT

18KB
375 lines

Crate Docs Apache 2.0

Uint-ZigZag

Uint-zigzag is a convenience wrapper for zig-zag encoding integers to byte sequences.

This allows better compression since the majority of numbers are quite small resulting in 1 or 2 bytes in the most common case vs 4 for 32-bit numbers or 8 for 64-bit numbers.

This also permits the user to not have to think about which integer type is the most efficient to compress.

This crate is passively maintained.


lib.rs:

Uint is a convenience wrapper for zig-zag encoding integers to byte sequences.

This allows better compression since the majority of numbers are quite small resulting in 1 or 2 bytes in the most common case vs 4 for 32-bit numbers or 8 for 64-bit numbers.

This also permits the user to not have to think about which value is the most efficient to compress.

Dependencies

~295–630KB
~10K SLoC