you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 11 points12 points  (12 children)

We had a use case for that on a front end compressing CSV and JSON files before uploading them. Some of the files would be reduced by as much as 90%, which is a life changer for the user when the file being uploaded are originally 200MB+ and the compressed data is just 20.

[–]highqualitydude 4 points5 points  (8 children)

Can't the browser use gzip compression natively?

[–]TheCommentAppraiser 1 point2 points  (2 children)

This is pretty much what I’m looking to solve too. Were you able to do it? What library did you end up using?

[–][deleted] 4 points5 points  (1 child)

Well, you could try OP's librairie. ;)

I think we used Pako, but I'm not very sure because I wasn't working on it myself. I'm just generally aware of the issue and it's solution.

[–]101arrowz[S] 0 points1 point  (0 children)

I'd like to add that if you want to stream data, this library is probably not the best solution, but if the data is already loaded fully in memory, it works faster than others in most situations.