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.
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.
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.
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.
Then you must extact each file separately and verify them one by one. Scripting ability required.