lat::TarInputStream Class Reference
Read a TAR archive straight off an input stream.
More...
#include <Iguana/Utilities/classlib/zip/TarInputStream.h>
List of all members.
Detailed Description
Read a TAR archive straight off an input stream.
Notes:
- The archive can contain multiple files with the same file name (from updates).
- If a the same file (dev/inode pair) appears several times in the archive, the first time it appears as a regular file; the second and subsequent references appear as as a link.
- The archive may include entries used by TAR to store info for itself (labels), but these are not supported.
- Tar archives consist of a series of 512-byte blocks. Each entry in the archive has a header record followed by file contents padded to block size. The entire archive may be, but is not required to be padded to "record size", which is normally 20 blocks (= the blocking factor); the actual record size depends on tape media used or simply parameters to the program that created the archive. Hence the archive may end with an arbitrary number of zero blocks. (Note: if archives have been concatenated, there may be zero blocks in between archives.) The reader detects the all-zeros record as the end of the archive marker and stops reading at that point. (Lack of the all-zeroes end-of-archive marker is not considered an error; the last member is not required to be full block size either.) There may be more such zero blocks (= archive padded to tape record size) left in the input stream. If the archive is embedded in another stream, the embedder needs to take this into account, for example by knowing the exact size and the skipping what this stream did not read, or by continuing to read as long as there are null blocks and then pushing the rest back.
- This stream is not directly usable with real tape devices. For one, someone has to determine the tape record size. Secondly this stream does not make atomic writes of the tape record size. (The archive is rounded up to the default record size of 20 blocks.)
- Sparse files are not supported.
- GNU tar's extra headers are not supported.
This stream does not work on non-blocking input.
Definition at line 66 of file TarInputStream.h.
Constructor & Destructor Documentation
lat::TarInputStream::TarInputStream |
( |
InputStream * |
input |
) |
|
lat::TarInputStream::~TarInputStream |
( |
void |
|
) |
|
Member Function Documentation
virtual IOSize lat::TarInputStream::available |
( |
void |
|
) |
[virtual] |
virtual void lat::TarInputStream::close |
( |
void |
|
) |
[virtual] |
virtual void lat::TarInputStream::closeMember |
( |
void |
|
) |
[virtual] |
std::string lat::TarInputStream::extractStr |
( |
const void * |
buf, |
|
|
IOSize |
max | |
|
) |
| | [private] |
virtual TarMember* lat::TarInputStream::nextMember |
( |
void |
|
) |
[virtual] |
virtual void lat::TarInputStream::reset |
( |
void |
|
) |
[virtual] |
virtual IOSize lat::TarInputStream::skip |
( |
IOSize |
n |
) |
[virtual] |
bool lat::TarInputStream::validate |
( |
const void * |
buf, |
|
|
IOSize |
length | |
|
) |
| | [private] |
Member Data Documentation
The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:48:36 2009 for CMSSW by
1.5.4