Ryg_rans Is Not a Library

(fgiesen.wordpress.com)

8 points | by ibobev 4 days ago ago

2 comments

  • JSR_FDED a day ago ago

    For those of us who still didn’t understand what this is after reading TFA, it’s a way of compressing data where commonly used sequences get a short token and less common sequences need longer tokens to represent them. Just like Huffman coding except it works at a resolution of fractional bits rather than whole bits.

    • inigyou a day ago ago

      ANS is effectively an alternative to arithmetic encoding that is much easier to implement and delivers the same performance. It does have the small downside that you need to compress the file backwards, so no streaming compression.