oxen-io / libsession-util

Session utilities library
GNU General Public License v3.0
15 stars 16 forks source link

Add automatic compression/decompression #12

Closed jagerman closed 1 year ago

jagerman commented 1 year ago

We use an embedded static version of zstd for compression, which gives us identical compression results for the same input (at least as long as we keep the same zstd version).

We always try to compress, but only actually use the compressed version if it ends up smaller (for very small messages, in particular, there often isn't enough repeated content to overcome the small overhead of compression).