Skip to content

Releases: j-towns/craystack

v0.2: Extend Craystack API allowing adaptive codecs, add Multiset codec, an…

11 Aug 15:07
98f5803
Compare
Choose a tag to compare

Incorporating significant changes by @dsevero:

  1. Adaptive codecs
    Signatures of push and pop are extended to allow for a *context variable.

    push: (ans_state, symbol, *context) -> (ans_state, *context)
    pop: (ans_state, *context) -> (ans_state, symbol, *context)
    

    Note that, since context is passed via unpacking (i.e. *context), then it is essentially optional. Therefore, previous codecs are still compliant with this new signature.

    However, the return of push will be at least (ans_state,), so function calls have been adapted accordingly. This means that instead of

    message = codec.push(message, symbol)
    

    we now have

    message, = codec.push(message, symbol)
    
  2. Multiset codec
    The multiset codec from https://github.com/facebookresearch/multiset-compression was ported to craystack/codecs/multiset.py.

  3. Extra example
    An extra example, showing how to use the multiset codec for BMNIST with BB-ANS, was added to craystack/examples.

v0.1

21 Apr 11:28
Compare
Choose a tag to compare
Simplify the Bernoulli codec