dissect.util.compression.xz
#
Module Contents#
Functions#
Repair CRC32 checksums for all headers in an XZ stream. |
Attributes#
- dissect.util.compression.xz.HEADER_FOOTER_SIZE = 12#
- dissect.util.compression.xz.CRC_SIZE = 4#
- dissect.util.compression.xz.repair_checksum(fh: BinaryIO) BinaryIO #
Repair CRC32 checksums for all headers in an XZ stream.
FortiOS XZ files have (on purpose) corrupt streams which they read using a modified
xz
binary. The only thing changed are the CRC32 checksums, so partially parse the XZ file and fix all of them.References
- Parameters:
fh – A file-like object of an LZMA stream to repair.