• Login
Community
  • Login

Wanted: 7-zip API Guru

Scheduled Pinned Locked Moved General Discussion
11 Posts 5 Posters 5.7k 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.
  • R
    rinku singh
    last edited by Dec 18, 2018, 3:46 AM

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

    1 Reply Last reply Reply Quote -3
    • E
      Eko palypse @donho
      last edited by Eko palypse Dec 18, 2018, 4:00 PM Dec 18, 2018, 4:00 PM

      @donho

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

      Eko

      1 Reply Last reply Reply Quote 0
      • D
        dinkumoil
        last edited by dinkumoil Dec 18, 2018, 6:34 PM Dec 18, 2018, 6:33 PM

        @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
        • D
          dinkumoil
          last edited by Dec 18, 2018, 8:47 PM

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

          D 1 Reply Last reply Dec 18, 2018, 11:51 PM Reply Quote 0
          • C
            chcg
            last edited by Dec 18, 2018, 10:28 PM

            @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
            • D
              dinkumoil
              last edited by Dec 18, 2018, 11:47 PM

              @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
              • D
                donho @dinkumoil
                last edited by donho Dec 19, 2018, 12:46 AM Dec 18, 2018, 11:51 PM

                @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
                • D
                  dinkumoil
                  last edited by Dec 19, 2018, 9:47 AM

                  @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
                  • D
                    dinkumoil
                    last edited by Dec 20, 2018, 1:32 PM

                    @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
                    • D
                      dinkumoil
                      last edited by Dec 21, 2018, 8:05 AM

                      @donho

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

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