Results 1 to 3 of 3

Thread: BareRose/nibrans

  1. #1
    Member
    Join Date
    Dec 2011
    Location
    Cambridge, UK
    Posts
    437
    Thanks
    137
    Thanked 152 Times in 100 Posts

    BareRose/nibrans

    I haven't tried it, but stumbled across this this morning and thought I'd share:

    https://github.com/BareRose/nibrans

    It's an adaptive nibble-bases rANS entropy encoder. It looks to have interfaces sufficient to simply accept whole buffers, but also via eg https://github.com/BareRose/nibrans/...nibrans.h#L214 shows how to call lower level primitives nbraEncPut. It appears to be based on Fabian's / Charles' blog posts on how to do 16-bit CDF updates for adaptive rANS.

    It claims around 75-95MB/s enc/dec performance.

    More here: https://www.reddit.com/r/gamedev/com...ased_adaptive/

  2. The Following 3 Users Say Thank You to JamesB For This Useful Post:

    encode (18th February 2019),Jarek (18th February 2019),Shelwien (18th February 2019)

  3. #2
    Member
    Join Date
    Mar 2013
    Location
    Worldwide
    Posts
    456
    Thanks
    46
    Thanked 164 Times in 118 Posts
    The compression ratio is too weak for the entropy coder benchmark.
    Each nibble is encoded separately. Normally, for an alphabet size of 256 the high nibble is used as context in the low nibble encoding.
    In this case the speed can't be compared.

    Code:
          C Size  ratio%   Name            File              
       621450120    62.1   TurboANXN o0    enwik9
       744770627    74.5   nibrans         enwik9
    Code:
          C Size  ratio%   Name            File             
       194794442    19.5   TurboANXN o0    enwik9bwt
       236249093    23.6   nibrans         enwik9bwt

  4. The Following 3 Users Say Thank You to dnd For This Useful Post:

    JamesB (20th February 2019),Jarek (20th February 2019),Shelwien (20th February 2019)

  5. #3
    Member
    Join Date
    Dec 2011
    Location
    Cambridge, UK
    Posts
    437
    Thanks
    137
    Thanked 152 Times in 100 Posts
    Thanks for the testing. That sounds like a glaring failure in the code, although presumably it's trivial to fix this and use the context correctly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •