python-libarchive-c icon indicating copy to clipboard operation
python-libarchive-c copied to clipboard

Support reading CRC32 from header

Open gregyski opened this issue 8 years ago • 3 comments

Would it be possible to support reading the CRC32 hash for the contained files from headers that contain them, such as those for 7-zip? Currently the entries produced by file_reader() do not seem to do so.

Thank you.

gregyski avatar Mar 13 '17 18:03 gregyski

I don't know, it depends on whether or not libarchive has a function we can use to access them.

Changaco avatar Mar 13 '17 18:03 Changaco

Aye. I've been trying to determine that. I think it's stored like the other properties like uncompressed size and modified timestamp.

Edit: Actually perhaps not, _7zip_entry doesn't seem to contain it. Edit 2: I think, for 7zip, it may be obtained in read_SubStreamsInfo(). But I don't know the file format well enough to be sure. I'll look at the 7zip source sometime in the next week and see if I can determine if it's something libarchive accesses or not. Even if it is, it may not have a format-independent function for obtaining it.

gregyski avatar Mar 13 '17 19:03 gregyski

related: https://github.com/libarchive/libarchive/issues/1003

eadmaster avatar Apr 16 '24 03:04 eadmaster