Neptune-Crypto/neptune-core

Compress `ActiveWindow` for storage and transfer

Opened this issue · 0 comments

The ActiveWindow struct from the Mutator Set construction is essentially a wrapper around Vec<u32>. The representation in this format is efficient for the mutator set operations, but for storage and transfer it is needlessly redundant:

  • All indices are less than $2^{20}$.
  • Indices are disproportionately likely to live at or near $0$ than at or near $2^{20}-1$.

A Huffman tree can save a significant amount of storage space and bandwidth. It would require a custom implementation of Serialize and Deserialize.