Forum

    • Register
    • Login
    • Search
    • Categories

    JUCE ZIP API....

    Feature Requests
    5
    12
    151
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Lindon
      Lindon last edited by

      So JUCE has this:

      https://docs.juce.com/master/classZipFile.html

      ..cant seem to see which version it arrived in, but i think pre-V6 - so we should be able to build this into HISE no?

      Given we have file download now available - it would be very handy to be able to download zipped files and uncompress them.

      HISE Development for hire.
      www.channelrobot.com

      ustk 1 Reply Last reply Reply Quote 3
      • d.healey
        d.healey last edited by

        Yeah it's been there for a long time.

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        1 Reply Last reply Reply Quote 0
        • ustk
          ustk @Lindon last edited by

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

          I cannot help pressing F5 in the forum...
          Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

          1 Reply Last reply Reply Quote 2
          • orange
            orange last edited by

            @Christoph-Hart Oh yes, it would be awesome 🙂

            develop Branch / XCode 13.1
            macOS Monterey / M1 Max

            1 Reply Last reply Reply Quote 1
            • Christoph Hart
              Christoph Hart last edited by

              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
              });
              
              Lindon ustk 4 Replies Last reply Reply Quote 4
              • Lindon
                Lindon @Christoph Hart last edited by

                @Christoph-Hart looks ideal....

                HISE Development for hire.
                www.channelrobot.com

                1 Reply Last reply Reply Quote 0
                • ustk
                  ustk @Christoph Hart last edited by

                  @Christoph-Hart Awesome!
                  having progress info and a bool on success would be great!

                  I cannot help pressing F5 in the forum...
                  Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

                  1 Reply Last reply Reply Quote 1
                  • d.healey
                    d.healey last edited by

                    Excellent!

                    Libre Wave - Freedom respecting instruments and effects
                    My Patreon - HISE tutorials
                    YouTube Channel - Public HISE tutorials

                    1 Reply Last reply Reply Quote 0
                    • ustk
                      ustk @Christoph Hart last edited by

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

                      I cannot help pressing F5 in the forum...
                      Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

                      1 Reply Last reply Reply Quote 0
                      • ustk
                        ustk @Christoph Hart last edited by ustk

                        @Christoph-Hart Any news on this side? I mean, I know codegen does not keep you that busy... 😛

                        I cannot help pressing F5 in the forum...
                        Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

                        Christoph Hart 1 Reply Last reply Reply Quote 2
                        • Christoph Hart
                          Christoph Hart @ustk last edited by

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

                          d.healey 1 Reply Last reply Reply Quote 3
                          • d.healey
                            d.healey @Christoph Hart last edited by

                            @christoph-hart Thank you!

                            Libre Wave - Freedom respecting instruments and effects
                            My Patreon - HISE tutorials
                            YouTube Channel - Public HISE tutorials

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post

                            20
                            Online

                            985
                            Users

                            6.6k
                            Topics

                            60.9k
                            Posts