You can use the Shell Add a comment. Active Oldest Votes. Isn't there a smarter way to detect a still working shell? This code works but the function WaitForMultipleObjects wait infinity if a thread has finished before this line. We use XZip for this purpose. Sergey Kornilov Sergey Kornilov 1, 2 2 gold badges 13 13 silver badges 22 22 bronze badges. Lou Franco Lou Franco I did find that sample code earlier, but it doesn't actually appear to work as is.
I did eventually get it to compile and run after some tweaking and it sort of works, provided the ZIP file already exists. If no one else comes up with a more complete answer I'll accept this one. The code provided to create a blank zip file does not create a valid file it's unable to be opened by any zip software including winzip, Windows built-in ZIP, BOMArchiver on OS X, or unzip on the command line. Specifically the code is in this comment eggheadcafe. The link is broken. It would have been better to put the essentials of the answer here and not only the link.
Show 2 more comments. Sparr Sparr 7, 29 29 silver badges 46 46 bronze badges. EmmEff EmmEff 7, 2 2 gold badges 16 16 silver badges 18 18 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. I think inheritance from library classes is bad, in general. DLLs are always pain, for developers as well as users.
Unzip only adds 40k in any case. The difference between zipping and unzipping is an current implementation drawback. I think an API should be clean, "aspirational", and you shouldn't encode current implementation limitations into the type system.
Most users will think of sources and targets which this design can't support. I also provided memory-buffers which adds an enormous amount of flexibility that's easy to use and requires no additional programming.
In general, Efrat wants code to be a clean extensible framework. I don't; I want small compact code that works fine as it is. Furthermore, I think that "framework-isation" is the biggest source of bugs and code overruns in the industry. This version of article was updated on 28th July Many thanks to the readers at CodeProject who found bugs and contributed fixes to an earlier version.
There was one terrible bug where, after a large file had been unzipped, then the next one might not work. Alvin77 spotted this bug. My work is a repackaged form of extracts from the zlib code available at www. A portable, simple zip library written in C Unlicense License.
Branches Tags. Could not load branches. Could not load tags. Latest commit. Update zip. Git stats commits. Failed to load latest commit information. View code. The Idea Some day, I was looking for zip library written in C for my project, but I could not find anything simple enough and lightweight. Everything what I tried required 'crazy mental gymnastics' to integrate or had some limitations or was too heavy.
0コメント