By default as long as you use the 7z
format then yes it will be what is known as a "solid" archive instead of simply a group of separately compressed files.
In fact 7zip (the program) can, if configured, go a step further than archives such as tar.bz
and others and can be set to actively scan the directories to compress and group files with similar extensions together as they are more likely to have similar data in them. As a result the compression can be slightly better than tar.bz
because that simply concatenates the stream of files as it finds them and may result in a less optimal group of files, particularly if the compression dictionary is small.
From the Why 7z archives created by new version of 7-Zip can be larger than archives created by old version of 7-Zip? section of their FAQ
New versions of 7-Zip (starting from version 15.06) use another file
sorting order by default for solid 7z archives.
Old version of 7-Zip (before version 15.06) used file sorting "by
type" ("by extension").
New version of 7-Zip supports two sorting orders:
- sorting by name - default order.
- sorting by type, if 'qs' is specified
in Parameters field in "Add to archive" window, (or -mqs switch for
command line version).
You can get big difference in compression ratio for different sorting
methods, if dictionary size is smaller than total size of files. If
there are similar files in different folders, the sorting "by type"
can provide better compression ratio in some cases.
As mentioned by DanielB in a comment you can actually configure the solid block size to your requirements as well, reverting to an old style "non-solid" archive containing individually compressed files with no interdependence on compressed data, or you can set it to be fully solid or use various block sizes depending on your data:
