Take the 2-minute tour ×
Software Recommendations Stack Exchange is a question and answer site for people seeking specific software recommendations. It's 100% free, no registration required.

This is a first question on this StackExchange site, please let me know if my question is off-topic, and if so, which of the sites would be more appropriate.

I am looking for an API that can be used with ANSI C on a Windows 7 OS. I will use it to uncompress files created using WinZip, DynaZip, 7zip.

(I have observed that each of these seem to accommodate compression algorithms created by each other, i.e. 7zip opens/creates files that can be open/created by WinZip which can in turn be open/created by DynaZip)

So far I have tried to compile the offerings from 7zip and miniz using an ANSI C compiler in the LabWindows/CVI environment (C99 implementation), but ran into missing header files for both offerings. I have also looked at the Windows APIs in MSDN, but did not find anything there. Surprised at that, and wonder if I just was not looking in the right areas.

I suspect either of the offerings from 7zip or miniz would be perfect, except for the incomplete file distribution. Insights from others that have successfully built either of these APIs (in a Windows/C99 environment) would be helpful. Or if there is another approach completely, i.e. another API. Any help is appreciated.

share|improve this question
    
Why does it have to be ANSI C? –  Cristian Ciupitu Jul 21 at 19:57
    
@CristianCiupitu - My customer is standardized on ANSI C, and the application with which I will use this API will be ansi C. If the API is written in C++, or C#, that is not a problem, it just has to have a way for me to link with it, i.e. delivered with .dll, .lib and .h. –  ryyker Jul 21 at 20:09

2 Answers 2

Perhaps libarchive is the answer, but I'm not sure if it's ANSI C. Though it's portable and works on most POSIX-like systems (including FreeBSD, Linux, Solaris, etc.) and supports Windows, including Cygwin, MinGW, and Visual Studio.

share|improve this answer
    
I will give it a look. Thanks. Are you aware if there are any links to examples using this library? I did not see one at the link you gave me. –  ryyker Jul 21 at 20:10
    

You can use LZMA SDK.

  • cross platform
  • ANSI C compatible
  • public domain license

You must tell your compiler where to look for headers or copy the headers to standard directories (see this).

share|improve this answer
    
LZMA requires using c++ for uncompressing .zip files according to its author. ANSI C compatibility seems to end with use only for LZMA compression. –  ryyker Jul 26 at 19:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.