54

I'd like to bundle a number of big files into a single file, to make them easier to share. The files are already compressed (eg. jpeg, video etc), so I don't need compression, only archiving. How can I put them in a zip file without using zip's compression feature? I don't want to waste time trying to compress gigabytes of already compressed files.

I want to use zip and not tar file because many Windows users can't open those files.

2
  • 4
    Which program are you using?
    – Dennis
    Apr 11, 2012 at 23:28
  • Just a FYI, even those those files have been compressed, you can probably reduce the total size in a compressed archive.
    – Keltari
    Mar 9, 2020 at 20:44

8 Answers 8

35

The ZIP format has always supported archiving files with zero compression ratio, even since pkzip/pkunzip in DOS times.

Nowadays, almost all compression programs support this; 7-Zip is one of them, it lets you specify the compression ratio both from the GUI and from the command line, and it's free.

3
  • 13
    in 7zip, the 'store' compression option should do the trick
    – Journeyman Geek
    Apr 11, 2012 at 23:48
  • 18
    On OS X, zip -Z store foo.zip a b c or zip -0 foo.zip a b c will archive a, b, and c without compressing them.
    – Ian Dunn
    Aug 24, 2016 at 23:36
  • 1
    @IanDunn's comment or @JasomDotnet's answer (zip -0 or zip -Z) should be considered correct answers. Nov 25, 2020 at 17:05
57

For Linux this shell command zips mydir folder with no compression:

zip -0 -r mydir.zip mydir
4

If you are using WinZip
Go to the "Settings" ribbon, and look for the "zip" group:

enter image description here

After that, drag the files you want to zip, into the file area.
A popup shows that the files have not been compressed in size:

enter image description here

3

Info-ZIP's zip, which is open source, free, and already installed on most Unixish systems has a -0 option to store only.

Also if you simply zip with any zipper and the entries would be shorter stored than compressed, which is what happens with already compressed files, then they will be stored automagically. However if you already know they're compressed, then it's faster to just tell zip to do that with -0.

0

Right click on all the files you want to zip, from the menu go to "send to" then click "compressed file".

4
  • This assumes a program to zip files is even installed, which may or may not be true.
    – Ivo Flipse
    Apr 12, 2012 at 9:33
  • 1
    @IvoFlipse: This is built-in Windows functionality. Apr 12, 2012 at 16:07
  • 10
    It is, but it does use compression. Apr 12, 2012 at 16:30
  • 2
    The title specifically says "Without compression" Apr 13, 2016 at 22:25
0

Almost all modern compression tools detect if files are already compressed, and chose not to compress such files.

0

You can also use B1 Free Archiver - it supports zip format perfectly. After clicking on "Create archive" just hit the button "More options" and choose "Store". It only stores the files as a single file without compressing them.

0

Using the zip command, you can supply a specific list of extensions to store without compression. That way you don't waste time (re-)compressing your media files, but you still get the benefits of compression for raw files in the same archive.

The flag is -n, and it takes a colon-separated list of extensions. E.g.

zip -n .gz:.mp4:.jpg -r mydir.zip mydir

There is a default list of stored files; according to the man page on my linux box:

By default, zip does not compress files with extensions in the list .Z:.zip:.zoo:.arc:.lzh:.arj

You can also specify a new default list using the ZIPOPT environment variable. E.g., under bash:

export ZIPOPT="-n .gz:.mp4:.jpg:.zip:.gif"

To completely disable this behaviour, including the default list of extensions, use an empty list consisting of a colon: zip -n : -r ....

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .