#byte-sequences #integer-compression #numbers #convenience #case #better #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 976/week @ 2024-10-18 876/week @ 2024-10-25 532/week @ 2024-11-01 797/week @ 2024-11-08 751/week @ 2024-11-15 579/week @ 2024-11-22 974/week @ 2024-11-29 925/week @ 2024-12-06 1484/week @ 2024-12-13 687/week @ 2024-12-20 466/week @ 2024-12-27 924/week @ 2025-01-03 1809/week @ 2025-01-10 949/week @ 2025-01-17 870/week @ 2025-01-24 1031/week @ 2025-01-31

4,803 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