hamedpro / freeflow-core

🩵⚡️next generation of decentralised collaboration
3 stars 1 forks source link

use xz to compress and decompress store.json #155

Open hamedpro opened 1 year ago

hamedpro commented 1 year ago

instead of writing JSON stringified of the store in store.json use xz compression algo.

hamedpro commented 1 year ago

do the writing process async and inside a separated async-lock so we can spend as much time as its required to compress the data before writing it to the disk. it also prevents memory issues. also maybe it be possible to using streams to do that.