certinia / apex-zip

Solutions for handling Zip files in Apex and Visualforce
BSD 3-Clause "New" or "Revised" License
23 stars 20 forks source link

Incorporate latest version of JSZip into Apex-zip #1

Open drhewitt opened 9 years ago

drhewitt commented 9 years ago

Hello,

There are updates to the JSZip library which may fix some import limitation errors I am having when using the Apex-zip app. How can I use the latest version of JSZip?

I only see two files, jszip.resource and jszip.resource-meta.xml.

dduponchel commented 9 years ago

jszip.resource is a zip archive, containing JSZip's files. These are at a pre-1.0 version (at commit Stuk/jszip@1459728) from 2012. A pre-v1.0 to v2.5 migration will need some code updates, please see JSZip's migration guide. This guide starts only at v1.0 but I checked the diff and found no breaking changes between the 1.0 version and the version used here, the upgrade guide should be enough.

What needs to be done (I may have forgotten some things, I just searched the code for breaking changes):

I also see a lot of string manipulation (base64, binary string, etc). Using array buffers instead (if possible) should give better performances.

I unfortunately can't help much, I don't even know how to test this code.

afawcett commented 9 years ago

Thanks, as @dduponchel mentions (thanks btw!), the library is indeed in this jszip.resource file (rename the extension to .zip and you'll see). If you want to submit a PR with a new one that would be great. But please do a bit of testing on it first. Thank you! :+1: