JUCE ZIP API....
-
Yeah it's been there for a long time.
-
@Lindon funny I’m trying to implement the api at the moment but to be honest I don’t think I’ll be able to do it.
@Christoph-Hart any chance to at least get a decompression api? -
@Christoph-Hart Oh yes, it would be awesome :)
-
I played around with this class a few years back and I think there was something off about it.
But since this appears to be a popular request, I can just add a scripting wrapper and then you can check it out yourself.
I would suggest this API:
const var myArchive = FileSystem.getFolder(FileSystem.Desktop).getChildFile("master.zip"); const var target = FileSystem.getFolder(FileSystem.Desktop).getChildFile("unzipped_dir"); myArchive.extractZipArchive(target, function(obj) { // this callback holds some information about the progress });
-
@Christoph-Hart looks ideal....
-
@Christoph-Hart Awesome!
having progress info and a bool on success would be great! -
Excellent!
-
@Christoph-Hart if the target is a directory, why do you make a use of getChildFile?
Do we need to prep a sub folder within the target directory named for instance with original zip name as it is often the case with zip extractors?Can we just extract the content somewhere in a directory with no sub folder? I imagine yes but just to be sure…
And what about overwriting?
-
@Christoph-Hart Any news on this side? I mean, I know codegen does not keep you that busy...
-
Just a short heads up - I've added the ability to track the progress for large files, so if your zip file contained 3 files with 1 GB each, it will execute the callback periodically with the true progress (bytes extracted / total bytes) properly and not just three times.
Somebody (I think David) requested this at some point, but it wasn't possible without hacking the JUCE code, but now I needed it myself, so...
-
@christoph-hart Thank you!