Score:1

compare 7z archive with local folder

za flag

How can I compare the local folder with a 7z archive?

The content should be compared and verified with file differences.

The archive is huge, extract and compare is not an option in this case.

cn flag
not by using standard tools. This is possible using python or perl.
Arduino_Sentinel avatar
cn flag
You could use a python script to achieve the comparison, however the 7z archive file will still need to be extracted first, all done by the script.
Score:3
in flag

fuse-7z is an option

fuse-7z -r archivetest.7z /mnt/7zreadonly

fuse-7z will mount the 7z file as a readonly file system, then you can do you compare.

Fuse-Archive at https://github.com/google/fuse-archive can also mount 7z Files.

Score:2
tm flag

It's not possible to compare the differences in the contents of the 7z file, with the differences in the contents of the local folder, unless the 7z file is extracted. That's a side effect of lossless compression: side-by-side comparison with uncompressed data is not possible.

You can look inside the 7z archive to see hashes of individual files, but you cannot determine exactly which bytes inside that file are different from that same file outside the archive. That's the side effect of a hash checksum: the data can only be integrity verified using it, not that it is encrypted & you can decrypt it using the hash checksum to get the data itself back from just that. I assume this is not what you want either.

So the last alternative, if you are unable to extract the huge 7z archive, you can archive the local folder again, creating another huge 7z archive I assume, & compare hash of that with hash of the 7z file in question, & that will tell you if there is a difference between them, but not what those differences are, as again, that is not possible given your scenario restrictions.

Score:0
um flag

Then you must extact each file separately and verify them one by one. Scripting ability required.

Jacek Marcin Jaworski avatar
um flag
I was thinking that he mean "extract all files at once".
karel avatar
sa flag
The archive is huge is probably why 2IRN doesn't want to extract it.
Jacek Marcin Jaworski avatar
um flag
But he can extract one by one file and check them all. It will be slow, but should work.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.