Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

zipios_backbuffer(3) [debian man page]

zipios::BackBuffer(3)					     Library Functions Manual					     zipios::BackBuffer(3)

NAME
zipios::BackBuffer - A BackBuffer instance is useful for reading the last part of a file in an efficient manner, when it is not known exactly how far back (towards the front!) to go, to find the start of the desired data block. SYNOPSIS
#include <backbuffer.h> Inherits vector< unsigned char >. Public Member Functions BackBuffer (istream &is, VirtualSeeker vs=VirtualSeeker(), int chunk_size=1024) BackBuffer constructor. int readChunk (int &read_pointer) Reads another chunk and returns the size of the chunk that has been read. Detailed Description A BackBuffer instance is useful for reading the last part of a file in an efficient manner, when it is not known exactly how far back (towards the front!) to go, to find the start of the desired data block. BackBuffer is a vector< unsigned char > that fills itself with data from a file by reading chunks from the end of the file progressing towards the start. Upon construction the BackBuffer instance is associated with a file and a chunksize can be specified. To read a chunk of the file into the BackBuffer call readChunk(). Definition at line 32 of file backbuffer.h. Constructor &; Destructor Documentation zipios::BackBuffer::BackBuffer (istream &is, VirtualSeekervs = VirtualSeeker(), intchunk_size = 1024) [inline, explicit] BackBuffer constructor. Parameters: is The istream to read the data from. The stream must be seekable, as BackBuffer will reposition the file position to read chunks from the back of the file. chunk_size specifies the size of the chunks to read the file into the BackBuffer in. Exceptions: FCollException Thrown if the VirtualSeeker vs that has been specified is invalid for the istream is. Definition at line 61 of file backbuffer.h. Member Function Documentation int zipios::BackBuffer::readChunk (int &read_pointer) [inline] Reads another chunk and returns the size of the chunk that has been read. Returns 0 on I/O failure. Parameters: read_pointer When a new chunk is read in the already stored bytes change position in the BackBuffer. read_pointer is assumed by readChunk() to be a pointer into a position in the BackBuffer, and is updated to point to the same position in the file as it pointed to before the new chunk was read. Definition at line 75 of file backbuffer.h. Author Generated automatically by Doxygen for Zipios++ from the source code. Zipios++ Mon Oct 10 2011 zipios::BackBuffer(3)

Check Out this Related Man Page

zipios::ZipFile(3)					     Library Functions Manual						zipios::ZipFile(3)

NAME
zipios::ZipFile - SYNOPSIS
#include <zipfile.h> Inherits zipios::FileCollection. Public Member Functions ZipFile () Default constructor. ZipFile (const string &name, int s_off=0, int e_off=0) Constructor. virtual FileCollection * clone () const Create a heap allocated clone of the object this method is called for. virtual ~ZipFile () Destructor. virtual void close () Closes the FileCollection. virtual istream * getInputStream (const ConstEntryPointer &entry) virtual istream * getInputStream (const string &entry_name, MatchPath matchpath=MATCH) Returns a pointer to an opened istream for the specified entry name. Static Public Member Functions static ZipFile openEmbeddedZipFile (const string &name) Detailed Description ZipFile is a FileCollection, where the files are stored in a .zip file. Definition at line 20 of file zipfile.h. Constructor &; Destructor Documentation zipios::ZipFile::ZipFile () [inline] Default constructor. Definition at line 37 of file zipfile.h. zipios::ZipFile::ZipFile (const string &name, ints_off = 0, inte_off = 0) [explicit] Constructor. Opens the zip file name. If the zip 'file' is embedded in a file that contains other data, e.g. a binary program, the offset of the zip file start and end must be specified. Parameters: name The filename of the zip file to open. s_off Offset relative to the start of the file, that indicates the beginning of the zip file. e_off Offset relative to the end of the file, that indicates the end of the zip file. The offset is a positive number, even though the offset is towards the beginning of the file. Exceptions: FColException Thrown if the specified file name is not a valid zip archive. IOException Thrown if an I/O problem is encountered, while the directory of the specified zip archive is being read. Definition at line 30 of file zipfile.cpp. zipios::ZipFile::~ZipFile () [virtual] Destructor. Definition at line 46 of file zipfile.cpp. Member Function Documentation FileCollection * zipios::ZipFile::clone () const [virtual] Create a heap allocated clone of the object this method is called for. The caller is responsible for deallocating the clone when he is done with it. Returns: A heap allocated copy of the object this method is called for. Implements zipios::FileCollection. Definition at line 41 of file zipfile.cpp. void zipios::ZipFile::close () [virtual] Closes the FileCollection. Implements zipios::FileCollection. Definition at line 50 of file zipfile.cpp. istream * zipios::ZipFile::getInputStream (const ConstEntryPointer &entry) [virtual] Returns a pointer to an opened istream for the specified FileEntry. It is the callers responsibility to delete the stream when he is done with it. Returns 0, if there is no such FileEntry in the FileCollection. Parameters: entry A ConstEntryPointer to the FileEntry to get an istream to. Returns: an open istream for the specified entry. The istream is allocated on heap and it is the users responsibility to delete it when he is done with it. Exceptions: InvalidStateException Thrown if the collection is invalid. Implements zipios::FileCollection. Definition at line 55 of file zipfile.cpp. istream * zipios::ZipFile::getInputStream (const string &entry_name, MatchPathmatchpath = MATCH) [virtual] Returns a pointer to an opened istream for the specified entry name. It is the callers responsibility to delete the stream when he is done with it. Returns 0, if there is no entry with the specified name in the FileCollection. Parameters: matchpath Speficy MATCH, if the path should match as well, specify IGNORE, if the path should be ignored. Returns: an open istream for the specified entry. The istream is allocated on heap and it is the users responsibility to delete it when he is done with it. Exceptions: InvalidStateException Thrown if the collection is invalid. Implements zipios::FileCollection. Definition at line 61 of file zipfile.cpp. ZipFile zipios::ZipFile::openEmbeddedZipFile (const string &name) [static] Opens a Zip archive embedded in another file, by writing the zip archive to the end of the file followed by the start offset of the zip file. The offset must be written in zip-file byte-order (little endian). The program appendzip, which is part of the Zipios++ distribution can be used to append a Zip archive to a file, e.g. a binary program. Exceptions: FColException Thrown if the specified file name is not a valid zip archive. IOException Thrown if an I/O problem is encountered, while the directory of the specified zip archive is being read. Definition at line 19 of file zipfile.cpp. Author Generated automatically by Doxygen for Zipios++ from the source code. Zipios++ Mon Oct 10 2011 zipios::ZipFile(3)
Man Page