Potential use case: instead of using CSS sprite maps (putting all of your images into one image to reduce the number of http requests generated by your page, then using css magic to select regions inside of that image), image files could be zipped into an image package that is delivered to the client, who unzips it and uses the images inside. This would cut down on the number of requests made, but allow the images to…
JSZip: Create, read and edit .zip files with JavaScript
21–30 of 57 posts
Re: JSZip: Create, read and edit .zip files with JavaScript
#22>JavaScript today is capable of generating a lot of data. The easiest way to deliver multiple files to your users is in a zip file. Instead of wasting server resources and bandwidth you can get the client to do it for you. ... Am I not understanding what they're saying here or do the authors really not understand how the internet works? It looks to me like they're saying "don't bother letting your users download zip…
Just think of all of the container formats that use ZIP with different file extensions. JAR and ePub to be two off the top of my head; I am sure there are plenty more.
The importance is not in compression, it is in container formats.
Re: JSZip: Create, read and edit .zip files with JavaScript
#23Earlier quoted context omitted.
Some images formats already come with compression. Also, zip doesn't work with well with binary data. Using CSS to "subscript" into the sprite is a better solution.
Except that the primary utility of zip is usually not its compression. It's the combining of multiple files into one "file". Basically what tar was invented for, but with actual universal support on every OS.
Re: JSZip: Create, read and edit .zip files with JavaScript
#24This is exactly a project I was about to embark upon to generate ePub files from client-side JS. Thanks!
Re: JSZip: Create, read and edit .zip files with JavaScript
#25Potential use case: instead of using CSS sprite maps (putting all of your images into one image to reduce the number of http requests generated by your page, then using css magic to select regions inside of that image), image files could be zipped into an image package that is delivered to the client, who unzips it and uses the images inside. This would cut down on the number of requests made, but allow the images to…
i'm surprised we don't have a cross-browser webarchive concept yet... especially with the emphasis on mobile.
Re: JSZip: Create, read and edit .zip files with JavaScript
#26Re: JSZip: Create, read and edit .zip files with JavaScript
#27>JavaScript today is capable of generating a lot of data. The easiest way to deliver multiple files to your users is in a zip file. Instead of wasting server resources and bandwidth you can get the client to do it for you. ... Am I not understanding what they're saying here or do the authors really not understand how the internet works? It looks to me like they're saying "don't bother letting your users download zip…
As an example, someone told me about a web app[1] which allows you to create an animated sprite offline. They use JSZip to let you download all the frames in one file.
There's actually an outstanding PR[2] to update the documentation that I still need to review, hopefully that makes things clearer.
[1] http://www.piskelapp.com/ [2] https://github.com/Stuk/jszip/pull/114
Re: JSZip: Create, read and edit .zip files with JavaScript
#28>JavaScript today is capable of generating a lot of data. The easiest way to deliver multiple files to your users is in a zip file. Instead of wasting server resources and bandwidth you can get the client to do it for you. ... Am I not understanding what they're saying here or do the authors really not understand how the internet works? It looks to me like they're saying "don't bother letting your users download zip…
Consider something like bootstrap, which allows you to customize your download before sending you a zip file. The assets are already loaded (since you're viewing the bootstrap demo page), so instead of making a request to another server to generate some sort of compressed file for you, that labor is offloaded to the client.
Re: JSZip: Create, read and edit .zip files with JavaScript
#29We use jszip for parsing xlsx/xlsm/xlsb files in the browser (Excel 2007+ files are zip files that contain XML or binary files in specific locations): https://github.com/SheetJS/js-xlsx JSZip works well for small files, but unzipping XLSB files larger than 50M seem to cause out of memory issues in Firefox
You may want to take a look at the master branch, because we've recently updated our inflate/deflate implementation to use the much faster Pako, https://github.com/nodeca/pako
Re: JSZip: Create, read and edit .zip files with JavaScript
#30Earlier quoted context omitted.
i'm surprised we don't have a cross-browser webarchive concept yet... especially with the emphasis on mobile.
We have a fantastic one based on MIME that is usable by everything except Firefox (however you need to enable some experimental stuff in Chrome). http://en.wikipedia.org/wiki/MHTML