explicitly disable gz initalization for _Stream’s used in aux files
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Fri, 21 Apr 2017 16:03:17 +0000 (18:03 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 2 Apr 2018 11:34:08 +0000 (13:34 +0200)
commitbec34b42e1779d219c43f451c17621f86b75071f
treee6b8b214267a321cd1e9baf430bce42a3c064c69
parent46c03c021f0e7f28452079d21645fc27993bcafb
explicitly disable gz initalization for _Stream’s used in aux files

The process of writing an auxiliary (index, info) file differs
drastically from that of tar archives: Since files are not added
individually, the encryption must be initialized externally and
the compression layer cannot rely on being enable in the ctor
because, obviously, the latter is executed before the manual
encryption setup can be performed.

Extend the API of the _Stream ctor with a parameter to “noinit”
to request that all initialization be postponed until the
encryption has been set up. This seems to do the trick but is
quite ugly.
deltatar/deltatar.py
deltatar/tarfile.py
testing/test_deltatar.py