7

After having false starts with poco's zip and minizip (both have issues, minizip can't decompress files larger than 2gb and poco zip corrupts any zip file larger than 2 gigs it compresses) I was wondering if there was anything else left?

So any suggestions for a C++ archive library that can handle zip AND zip64?

meds
  • 21,699
  • 37
  • 163
  • 314

2 Answers2

2

7-zip handles both, as far as I could tell from a quick glance at their source code. It's also LGPL, which should allow its use in a closed source app.

Pablo
  • 8,644
  • 2
  • 39
  • 29
  • http://stackoverflow.com/questions/94346/can-i-legally-incorporate-gpl-lgpl-open-sourced-software-in-a-proprietary-cl – Pablo Nov 28 '11 at 04:42
2

Well there is the all-around very proven ZLIB : http://zlib.net/

Cyan
  • 13,248
  • 8
  • 43
  • 78
  • zlip doesn't support zip64, it has a sublibrary called minizip that does but it can't manage files larger than 2gb. – meds Nov 28 '11 at 11:52
  • zlib includes code for decompressing deflate64 data. You can find it in contrib/infback9 in the zlib source code distribution. Note that Deflate64 is "just" the core decompression algorithm, and you also need the Zip64 header format to correctly decode a Zip64 file. – Cyan Nov 28 '11 at 15:23
  • Note that zlib *can* handle zip64 - with a bit of a hack: see e.g. such a hack in LibreOffice code at https://git.libreoffice.org/core/+/abda72eeac19b18c22f57d5443c3955a463605d7%5E%21 - basically, the z_stream's total_in/total_out can be 32-bit (e.g., on Windows), so must be checked if owerflow. – Mike Kaganski Apr 11 '23 at 10:14