Thursday, October 22nd, 2009

Client-Side tar and LZMA compression

Category: Browsers

<>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)

Browser Plus add-on to pack on the client side

Browser Plus add-on to pack on the client side

Using the API is as easy as calling the right method and sending it the files:

javascript
< view plain text >
  1. BrowserPlus.Tar.tar({'files':files});
  2. BrowserPlus.LZMA.compress({'files':files});

Both the LZMA and the tar extension are available on GitHub.

Posted by Chris Heilmann at 2:11 am
6 Comments

++---
2.6 rating from 52 votes

6 Comments »

Comments feed TrackBack URI

Can someone please explain to me why do I need this, instead of just minify + Gzip my files on the server ?

Comment by vsync — October 23, 2009

@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.

Comment by sourceRoot — October 23, 2009

@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.

Comment by vsync — October 23, 2009

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 ..

Comment by sourceRoot — October 23, 2009

Compression where you need it when you need it. Is that the idea?

Comment by jvaughan — October 26, 2009

Leave a comment

You must be logged in to post a comment.