Closed marcusklaas closed 9 years ago
The result is already base64 encoded!
Use this for compression: https://github.com/nmrugg/LZMA-JS. Probably a bit overkill, but the library looks too good to pass up on.
Maybe https://github.com/pieroxy/lz-string/ is a better fit. It's a lot faster than LZMA and the library is smaller.
Besides adding compression, we should change the outermost layer of our library from
{
hmac: String,
library: Object
}
to
{
hmac: String,
library: String // JSON representation of library object
}
This should save us a JSON.stringify
operation during decoding and, more importantly, makes our integrity check independent of JSON printer.
The current library file grows large quite quickly. We should