title: How do I use Minizip (on Zlib)?
body: <p>I'm trying to archive files for a cross-platform application, and it looks like Minizip (built on zlib) is about as portable as archivers come.</p>
  
  <p>When I try to run the following dummy code, however, I get a system error <code>[my executable] has stopped working. Windows can check online for a solution to the problem.</code></p>
  
  <p>Can anyone help me see how to use this library? &mdash; (there's no doc or tutorial anywhere that I can find)</p>
  
  <pre><code>zip_fileinfo zfi;
  
  int main()
  {
      zipFile zf = zipOpen("myarch.zip",APPEND_STATUS_ADDINZIP);
      int ret = zipOpenNewFileInZip(zf,
          "myfile.txt",
          &amp;zfi,
          NULL,   0,
          NULL,   0,
          "my comment for this interior file",
          Z_DEFLATED,
          Z_NO_COMPRESSION
          );
      zipCloseFileInZip(zf);
      zipClose(zf, "my comment for exterior file");
      return 0;
  }
  </code></pre>
  
  <p><em>Specs: Msys + MinGW, Windows 7, using zlibwapi.dll from zlib125dll.zip/dll32</em></p>