implement tolerant gz header parser
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Thu, 24 Aug 2017 15:24:36 +0000 (17:24 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 2 Apr 2018 11:34:09 +0000 (13:34 +0200)
commitdfd7865ec6815df79cff6a853be0d749acc420d3
tree62789569c438e060aa21fc0c716f916365662100
parent202104ede6cec3e811f3b8a4cdf23c2eb5981f47
implement tolerant gz header parser

Since they assume a stream object, we cannot rely on the original
tarfile GZ handling. Add a “tolerant” one according to the format
spec that notices malformed or unexpected (in Deltatar context)
values, but glosses over them if they do not necessarily impact
the readability of the object.

Also use the new symbolic constants in the existing GZ reader
instead of magic numbers.
deltatar/tarfile.py