TarStream

A tar archive parsed as its bytes arrive.

Declared in src/libs/libcompression/compression/TarReader.hpp.

Detailed description

The one parse every TarReader call uses: feed() takes the archive in slices of any size, down to one byte, and hands each member to the visitor once its payload is whole. It holds one header and one member's payload, never the archive, so an archive of any size parses in the memory of its largest file. Qt's source archive is 5.5 GB of tar (qt-vendoring §QV-D1); a whole-buffer parse held all of it.

finish() checks that the end-of-archive marker came, which a stream that stopped mid-archive never has. After any failure the stream is dead and every later call repeats the error.

In this section