Wanted: 7-zip API Guru
donho last edited by donho
The zip decompressor that Notepad++ is using for Plugins Admin has a quite critical bug. So Notepad++ needs a more reliable decompress component for that.
7zip could be a solution to the project, and it has great advantages because 1. it’s well tested. 2. it contains the better ratio compression algorithm which allow Notepad++ (plugin) community use 7z format.
I have check LZMA SDK in the official site here: https://www.7-zip.org/sdk.html
However I didn’t find the way/tutorial to integrate their source code into Notepad++. So if you have had 7zip integrate experience, please point me to a tutorial link or provide me a concrete example. Thank you.
rinku singh last edited by
Eko palypse last edited by Eko palypse
dinkumoil last edited by dinkumoil
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.
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.
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.
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.
Please do not switch away from the ZIP format! That’s simply not necessary.
donho last edited by donho
I believe the unzip bug in WinGup has been fixed (no more zero length unzipped file) :
Could you confirm me if it’s fixed?
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.
Unfortunately your last fix of Gup.exe didn’t help. Now we have other bugs. See the results of my test.
Your latest fix did it! Thank you and happy holidays.