noledgebin / frontend

NoledgeBin is a zero-knowledge pastebin
https://andinus.unfla.me/noledgebin/
GNU Affero General Public License v3.0
1 stars 1 forks source link

Improve compression, fix decompression #15

Closed andinus closed 2 years ago

andinus commented 2 years ago

Commit 91d619c73847e410e71b977d5bf0c424d25c1a06 broke decompression. We switched to using objects and used JSON.stringify on it. But while decompressing we didn't account for this change.

This commit also improves compression, as explained in comments:

 Convert the compressed paste to string before storing it. Later
 we're stringifying this object, if we don't convert it to string
 here then JSON.stringify will preserve the Array structure, using
 more space.