Logo Search packages:      
Sourcecode: pbzip2 version File versions  Download package

Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes

pbzip2::BZ2StreamScanner Class Reference

Collaboration diagram for pbzip2::BZ2StreamScanner:
Collaboration graph
[legend]

List of all members.

Public Types

enum  BZ2SScannerErrorFlag {
  ERR_MEM_ALLOC_INBUFF = 1, ERR_MEM_ALLOC_OUTBUFF = 1 << 1, ERR_IO_READ = 1 << 2, ERR_IO_INSUFFICIENT_BUFF_CAPACITY = 1 << 3,
  ERR_INVALID_STATE = 1 << 4, ERR_INVALID_FILE_FORMAT = 1 << 5
}
typedef unsigned char CharType

Public Member Functions

 BZ2StreamScanner (int hInFile, size_t inBuffCapacity=DEFAULT_IN_BUFF_CAPACITY)
virtual void dispose ()
bool eof () const
bool failed ()
int getErrState () const
const basic_string< CharType > & getHeader () const
size_t getHeaderSize () const
size_t getInBuffCapacity () const
size_t getInBuffSize () const
outBuffgetNextStream ()
bool getSearchStatus () const
int init (int hInFile, size_t inBuffCapacity=DEFAULT_IN_BUFF_CAPACITY)
bool isBz2HeaderFound () const
bool isOutBuffFullEnough () const
void printCurrentState ()

Static Public Attributes

static const size_t DEFAULT_IN_BUFF_CAPACITY = 1024 * 1024
static const size_t DEFAULT_OUT_BUFF_LIMIT = 1024 * 1024

Private Member Functions

int appendOutBuffData (CharType *end)
int appendOutBuffData ()
int appendOutBuffDataUpToLimit ()
 BZ2StreamScanner (const BZ2StreamScanner &orig)
int ensureOutBuffCapacity (size_t newSize)
CharType * getInBuffBegin ()
CharType * getInBuffCurrent ()
CharType * getInBuffEnd ()
CharType * getInBuffSearchPtr ()
size_t getOutBuffCapacityLimit () const
char * getOutBuffEnd ()
size_t getUnsearchedCount () const
void initOutBuff (char *buf=NULL, size_t bufSize=0, size_t bufCapacity=0)
CharType * locateHeaderPrefixInBuff ()
int readData ()
int rewindInBuff ()
CharType * searchNextHeader ()
CharType * searchNextHeaderInBuff ()

Private Attributes

basic_string< CharType > _bz2Header
bool _bz2HeaderFound
basic_string< CharType > _bz2HeaderZero
bool _eof
unsigned int _errState
int _hInFile
CharType * _inBuff
size_t _inBuffCapacity
CharType * _inBuffCurrent
CharType * _inBuffEnd
CharType * _inBuffSearchPtr
outBuff _outBuff
size_t _outBuffCapacity
size_t _outBuffCapacityHint
size_t _outBuffCapacityLimit
int _outSequenceNumber
bool _searchStatus
int _streamNumber

Detailed Description

Definition at line 20 of file BZ2StreamScanner.h.


The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index