festival
festival copied to clipboard
`Collection` compression
What
disk
can (de)compress files with gzip
when saving/reading. This includes the Collection
.
collection.bin
would be collection.bin.gz
.
Collection
with the current disk
options have a 2:1 compression rate, e.g, 600 MB
-> 300 MB
.
Pros
- Cuts disk usage in half
- Manually running
gzip collection.bin
andgzip -d collection.bin.gz
are both viable - Both compressed and non-compressed version would be cross-compatible
Cons
- Deserialization takes 10x longer (
0.18s
->1.80s
) - Serialization takes longer 5-6x longer (
0.6s
->3.3s
) - Memory usage is greater (must hold
gz
bytes alongside regular bytes)
Todo
This feature is only be viable if the (de)compression times are minimal.
So, disk
needs to be better before this can be considered.