Neptune-Crypto / neptune-core

anonymous peer-to-peer cash
Apache License 2.0
23 stars 7 forks source link

Compress `ActiveWindow` for storage and transfer #103

Open aszepieniec opened 5 months ago

aszepieniec commented 5 months ago

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:

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