Thursday, October 22nd, 2009
Client-Side tar and LZMA compression
<>p>The BrowserPlus team of Yahoo released a client-side compression API. As explained in the following screencast, the JavaScript API allows you to pack and compress files on the client with LZMA or tar.
Client Side Compression from Lloyd Hilaiel on Vimeo.
You can read more about the implementation or try out the live demo (requires BrowserPlus)
Using the API is as easy as calling the right method and sending it the files:
-
BrowserPlus.Tar.tar({'files':files});
-
BrowserPlus.LZMA.compress({'files':files});
Both the LZMA and the tar extension are available on GitHub.
Related Content:












Can someone please explain to me why do I need this, instead of just minify + Gzip my files on the server ?
@vsync
Because the browser is morphing into the ultimate VM, and in the near future we don’t want to assume that a server is available for our apps to run. I’m working on a project right now that’s a framework for desktop apps that assume a standalone status. The Server is just a repository for data.
Specifically, as an example: Lets say you have a game that generates svg files, these files can be huge and really theres no room on the server for this kind of overhead. Soooo zip em, cache em, and upload snapshots at intervals, or buy additional servers… when you do the gzip stream its like, 1.zip->2.unzip->3.re-zip(on the server) we can make that 1.zip saving teraflops.
@sourceRoot
So this is basically good for web apps, but not really for websites
that only needs to serve JS and CSS files as fast as possible.
Ehh I just watched that video again, I didn’t know it required a plugin :)
I can make zip files in a java applet .. thats not that impressive ..
Compression where you need it when you need it. Is that the idea?