3 ms·
> compressing before tarring is probably better Not if the files are similar. If you're compressing the files separately you'll start with a clean state rather
by viraptor 4y ago
> compressing before tarring is probably better
Not if the files are similar. If you're compressing the files separately you'll start with a clean state rather than reusing previous fragments. Compressing a BMP after a TXT may not be beneficial, but compressing 3 tar'ed TXTs is definitely better than doing them separately.
- zweifuss 4y agoThat is true and seems easily half the total size with small and similar files, but it also means you have to unpack the whole archive when you need the last file in a tarball. AFAIK the gzip command still cannot compress directory information and therefore needs tar in front of it if you want to retain a folder structure.