OldGuy said:
Andy explained on 11/26/2012 :
Look at 7-Zip. It has both a Windows and command line app.
7-Zip is compatible with WinZip and Windows.
After you install 7-ZIP, look for the file "7-zip.chm"
in the Program Files folder for it. Double-click
on the .chm to display the Help window. In there
are instructions for how to craft a command line
invocation.
Don't be surprised if it takes you a while to get
the command options right. If you point it to a
directory, it automatically recurses (captures the
whole directory tree you point it at). The wild card
options might not work the way you expect either.
So be prepared for the odd surprise.
7ZIP has command line options for the "container" and
the "compressor". Some containers have multiple options
for compressors.
There are some examples on this page as well.
http://linux.die.net/man/1/7z
Using the examples there, in Windows I might start with
7z --help
7z.exe a -tzip archiveoutput.zip *.txt
That would store all the *.txt files in archiveoutput.zip
The Linux version is a port of the Windows version, but
there's a good chance it shares something in common
with respect to options.
When I need to compress really large files, I sometimes
use other programs for that, as the best space-time tradeoff.
7Zip only uses multiple cores on some compression algoritms
and not all. The utility "pigz.exe" is a GZIP compressor that
uses multiple cores, and I like "pigz -3" as a level of
compression for disk sized jobs. The Windows version of pigz
has its issues, so if I want something I know will work well,
I switch over to Linux and run their version. If I use
7ZIP, and use the very best compression options for space,
it could take up to a week to complete, depending on what
I'm doing. At first, the lure of high compression looks like
a win, until you begin to realize how long it will take.
For small jobs though, this isn't an issue. If you need to
compress a gigabyte of stuff, you probably don't care.
HTH,
Paul