Re: Adding support for LZIP to dpkg, using that instead of xz, archive wide
Nicholas Breen wrote:
If there is just the excrement of a fly adhered to a corner of the
envelope (a null byte appended to an otherwise intact file, for
example), xz will report that the data is corrupt and will not
deliver the message. This test is inescapable.
Decompress only the first .xz stream, and silently ignore pos-
sible remaining input data following the stream.
Just try this command:
xz -d --single-stream file_with_many_streams_and_null_byte.xz
Xz decompresses the first stream in the file, then deletes the file, and
finally exits with 0 status.
I was wrong. In some cases the "Compressed data is corrupt" message can
be silenced... at the cost of silent massive data loss.