Community
    • Login

    Wanted: 7-zip API Guru

    Scheduled Pinned Locked Moved General Discussion
    11 Posts 5 Posters 5.3k 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.
    • rinku singhR
      rinku singh
      last edited by

      https://sourceforge.net/projects/sevenzip/files/

      1 Reply Last reply Reply Quote -3
      • Eko palypseE
        Eko palypse @donho
        last edited by Eko palypse

        @donho

        not a 7-zip API Guru but maybe this C++ wrapper is useful for you.

        Eko

        1 Reply Last reply Reply Quote 0
        • dinkumoilD
          dinkumoil
          last edited by dinkumoil

          @donho

          I have created a Gist with a small demo program written in C++ (actually it’s very C-ish ;-) ). It uses the Windows Explorer OLE automation object for unzipping. It mimics the following VBScript code:

          With CreateObject("Shell.Application")
            .Namespace("E:\Dst").CopyHere .Namespace("E:\Src\AZipFile.zip").Items, &H0614
          
            Do Until .Namespace("E:\Dst").Items.Count = .Namespace("E:\Src\AZipFile.zip").Items.Count
              WScript.Sleep 500
            Loop
          End With
          

          It’s 300 lines of code, comments and whitepace. I bet if you use 7Zip it will be not much less.

          Please also read the comment under the Gist.

          1 Reply Last reply Reply Quote 4
          • dinkumoilD
            dinkumoil
            last edited by

            @donho

            Forgot to mention: The above script and, of course, the program from my Gist can extract recursively the whole content of a ZIP file, including all subfolders.

            donhoD 1 Reply Last reply Reply Quote 0
            • chcgC
              chcg
              last edited by

              @donho See https://github.com/notepad-plus-plus/wingup/tree/master/src/ZipLib/extlibs/lzma. 7z is already there, but don’t know if this issues observed with ziplib are caused by the ziplib itself or the usage of it. At least the part from https://github.com/notepad-plus-plus/wingup/pull/8 I would see as user issue or as missing feature to unzip the complete content of a zip file by just one api call.
              As already said at github I would avoid switching the file format from zip to 7z only without a real functional gain apart from some less Kbytes nowadays with high bandwidth internet access.

              1 Reply Last reply Reply Quote 4
              • dinkumoilD
                dinkumoil
                last edited by

                @chcg said:

                I would avoid switching the file format from zip to 7z only without a real functional gain apart from some less Kbytes nowadays with high bandwidth internet access.

                I fully agree.

                @donho

                Please do not switch away from the ZIP format! That’s simply not necessary.

                1 Reply Last reply Reply Quote 1
                • donhoD
                  donho @dinkumoil
                  last edited by donho

                  @dinkumoil

                  I believe the unzip bug in WinGup has been fixed (no more zero length unzipped file) :
                  https://notepad-plus-plus.org/temp/GUP_new.zip

                  Could you confirm me if it’s fixed?

                  1 Reply Last reply Reply Quote 1
                  • dinkumoilD
                    dinkumoil
                    last edited by

                    @donho

                    The result of my tests is, that I didn’t find 0 byte files but a plugin package that could not be unzipped. The same ZIP file can be extracted with 7-ZIP and Windows Explorer without any problems.

                    1 Reply Last reply Reply Quote 3
                    • dinkumoilD
                      dinkumoil
                      last edited by

                      @donho

                      Unfortunately your last fix of Gup.exe didn’t help. Now we have other bugs. See the results of my test.

                      1 Reply Last reply Reply Quote 1
                      • dinkumoilD
                        dinkumoil
                        last edited by

                        @donho

                        Your latest fix did it! Thank you and happy holidays.

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors