by tamsaraas · 4y ago · 0 comments
Depends on the data - you can have totally different output compressed archive if compare to winrar for example.
Example: I doing backups time to time, and archive important files into compressed archive containers (rar / 7zstd).
I've noticed, that my dev folder with tons of repositories, images, and different work related fines - vary damn too much.
/dev/ size = ~11GB
rar output (normal compression) = ~2.1 GB zstd archive output (normal compression) = ~4.7GB
Why? linked files, same files not treated as a 1 file + links to these files. Instead these files compressed each 1 by 1 instead of copy 1 identical, and compress the file. And many things like that.
Suggestion for 7z-zstd -> add ability to save links to files, not treat them as separate files, and adding an option like in winrar to search for identical files first and re-link all of them and remove duplicates, instead of compression each.
Archival software then has to build a file format on top of the compression algorithm, and there are multiple ways to slice the problem. For example, a tar.gz will first tar everything into a big archive file, then feed it into gzip for compression. zip, on the other hand, feeds each file individually into the chosen algorithm (DEFLATE for most implementations).
Your critique is that the 7zip archive format is not suitable for use with zstd in the case of many small yet identical files. zstd is doing its job, just the archival format is not playing along.