eugenesan - 2026-07-08

According to documentation (7zip.chm), adding/updating files to/in solid archives should trigger re-compression. But, from my testing that is not the case (see test log below).

When adding files to existing archive it says:

Keep old data in archive: 2 files, 21532 bytes (22 KiB)
Add new data to archive: 1 file, 10516 bytes (11 KiB)

Also resulting archives are considerably different in size despite the same content:
Archive size: 3751 bytes (4 KiB) vs Archive size: 2625 bytes (3 KiB)

Am I missing something? Is there a switch to force re-compression?

Test log:

$ 7z a -ms=on files.7z file1.log file2.log

7-Zip 26.02 (x64) : Copyright (c) 1999-2026 Igor Pavlov : 2026-06-25
64-bit locale=en_US.UTF-8 Threads:4 OPEN_MAX:4096, ASM

Scanning the drive:
2 files, 21532 bytes (22 KiB)

Creating archive: files.7z

Add new data to archive: 2 files, 21532 bytes (22 KiB)


Files read from disk: 2
Archive size: 2225 bytes (3 KiB)
Everything is Ok
$ 7z a -ms=on files.7z file3.log

7-Zip 26.02 (x64) : Copyright (c) 1999-2026 Igor Pavlov : 2026-06-25
64-bit locale=en_US.UTF-8 Threads:4 OPEN_MAX:4096, ASM

Open archive: files.7z
--
Path = files.7z
Type = 7z
Physical Size = 2225
Headers Size = 173
Method = LZMA2:24k
Solid = +
Blocks = 1

Scanning the drive:
1 file, 10516 bytes (11 KiB)

Updating archive: files.7z

Keep old data in archive: 2 files, 21532 bytes (22 KiB)
Add new data to archive: 1 file, 10516 bytes (11 KiB)


Files read from disk: 1
Archive size: 3751 bytes (4 KiB)
Everything is Ok
$ 7z a -ms=on files2.7z file*.log

7-Zip 26.02 (x64) : Copyright (c) 1999-2026 Igor Pavlov : 2026-06-25
64-bit locale=en_US.UTF-8 Threads:4 OPEN_MAX:4096, ASM

Scanning the drive:
3 files, 32048 bytes (32 KiB)

Creating archive: files2.7z

Add new data to archive: 3 files, 32048 bytes (32 KiB)


Files read from disk: 3
Archive size: 2625 bytes (3 KiB)
Everything is Ok