ultrapacker 0.1.0

Ultrapacker implementation in Rust
Documentation
  • Coverage
  • 22.22%
    2 out of 9 items documented0 out of 8 items with examples
  • Size
  • Source code size: 16.28 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.13 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Aceeri/ultrapacker
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Aceeri

Ultrapacker

Bitpack a sequence of integers more efficiently by combining groups of them together into bundles.

Why?

While working on some vertex compression I was trying to figure out how you could use the wasted space that was still present even with bitpacking. For example if I need a value between 0-18, I need 5 bits to represent this, but I'm not using the values from 19-32. I figured out that combining multiple values allows you to save bits by changing the range. Which is kind of similar to linearizing an multidimensional array: x + y * 18 + z * 18 * 18 gives you a range of 0-5832, which only requires 13 bits.

Later I found this: https://save-buffer.github.io/ultrapack.html Which is basically an abstraction of that concept.