How to do "legacy" ZIP compression with 7zip?

17

1

We have an old application that requires zip files to be "legacy" format. I would really love to get rid of the adware ridden WinZip and use 7zip. However, I don't know which compression options and such equal out to "legacy".

How to do it?

For reference the compression methods I have to choose from are

  1. Deflate
  2. Deflate64
  3. BZip2
  4. LZMA
  5. PPMd

Or does which compression method I use even matter? Would it all end up going in as a "legacy" zip file anyway?

Earlz

Posted 2011-08-23T19:35:12.610

Reputation: 3 966

What version of Windows are you using that doesn't have native ZIP support? – digitxp – 2011-08-23T19:44:59.013

@digi it's an old(circa early 2000s or possibly late 90s) ZIP decompression library used within a program. – Earlz – 2011-08-23T19:48:09.683

Answers

19

Legacy zip compression is akin to the Deflate method in 7-zip, and will offer the most compatibility between different compression software.

From the Winzip KB:

.Zip Legacy compression (maximum compatibility):

The Legacy (Zip 2.0) compression option uses a traditional data compression algorithm, known as deflate, that is supported by all versions of WinZip and virtually all other Zip file utilities. The deflate method is generally considered to be a good all-purpose compression algorithm for most types of files. .Zip: Legacy compression is your best choice when your mail recipient's Zip utility is unknown or known to use older technology. WinZip and WinZip Courier actually use the highest available compression setting for the deflate method or maximum deflate. This way you get the smallest, compatible Zip files possible.

John T

Posted 2011-08-23T19:35:12.610

Reputation: 149 037

If the archive extension is .ZIP then specifying the Deflate method is sufficient to get legacy compression. However if the extension is not .ZIP, it seems the command-line 7z.exe defaults Type of archive to -t7z and so -tzip must be specified instead (or in addition). – noam – 2018-10-09T12:13:11.530

"If -t{archive_type} switch is not specified, 7-Zip uses extension of archive filename to detect the type of archive. If you create new archive, -t{archive_type} switch is not specified and there is no extension of archive, 7-Zip will create .7z archive." https://sevenzip.osdn.jp/chm/cmdline/switches/type.htm

– noam – 2018-10-09T13:36:28.130