HISE Logo Forum
    • Categories
    • Register
    • Login

    JUCE ZIP API....

    Scheduled Pinned Locked Moved Feature Requests
    12 Posts 5 Posters 509 Views
    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.
    • LindonL
      Lindon
      last edited by

      So JUCE has this:

      Link Preview Image
      JUCE: ZipFile Class Reference

      favicon

      (docs.juce.com)

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

      ustkU 1 Reply Last reply Reply Quote 3
      • d.healeyD
        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
        • ustkU
          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?

          Can't help pressing F5 in the forum...

          1 Reply Last reply Reply Quote 2
          • orangeO
            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 HartC
              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
              });
              
              LindonL ustkU 4 Replies Last reply Reply Quote 4
              • LindonL
                Lindon @Christoph Hart
                last edited by

                @Christoph-Hart looks ideal....

                HISE Development for hire.
                www.channelrobot.com

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

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

                  Can't help pressing F5 in the forum...

                  1 Reply Last reply Reply Quote 1
                  • d.healeyD
                    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
                    • ustkU
                      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?

                      Can't help pressing F5 in the forum...

                      1 Reply Last reply Reply Quote 0
                      • ustkU
                        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... 😛

                        Can't help pressing F5 in the forum...

                        Christoph HartC 1 Reply Last reply Reply Quote 2
                        • Christoph HartC
                          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.healeyD 1 Reply Last reply Reply Quote 3
                          • d.healeyD
                            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

                            28

                            Online

                            1.8k

                            Users

                            12.1k

                            Topics

                            105.2k

                            Posts