#byte-sequences #numbers #integer-compression #convenience #better #case #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

#422 in Compression

Download history 731/week @ 2024-11-16 623/week @ 2024-11-23 963/week @ 2024-11-30 1072/week @ 2024-12-07 1480/week @ 2024-12-14 512/week @ 2024-12-21 433/week @ 2024-12-28 990/week @ 2025-01-04 1865/week @ 2025-01-11 935/week @ 2025-01-18 848/week @ 2025-01-25 1030/week @ 2025-02-01 992/week @ 2025-02-08 1582/week @ 2025-02-15 2109/week @ 2025-02-22 1336/week @ 2025-03-01

6,138 downloads per month
Used in 8 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

~230–530KB