Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

FlateStream Class Reference

#include </home/clem/local/src/opie/noncore/unsupported/qpdf/xpdf/Stream.h>

Inheritance diagram for FlateStream:

Inheritance graph
[legend]
Collaboration diagram for FlateStream:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FlateStream (Stream *strA, int predictor, int columns, int colors, int bits)
virtual ~FlateStream ()
virtual StreamKind getKind ()
virtual void reset ()
virtual int getChar ()
virtual int lookChar ()
virtual int getRawChar ()
virtual GStringgetPSFilter (char *indent)
virtual GBool isBinary (GBool last=gTrue)

Private Member Functions

void readSome ()
GBool startBlock ()
void loadFixedCodes ()
GBool readDynamicCodes ()
void compHuffmanCodes (FlateHuffmanTab *tab, int n)
int getHuffmanCodeWord (FlateHuffmanTab *tab)
int getCodeWord (int bits)

Private Attributes

StreamPredictorpred
Guchar buf [flateWindow]
int index
int remain
int codeBuf
int codeSize
FlateCode allCodes [flateMaxLitCodes+flateMaxDistCodes]
FlateHuffmanTab litCodeTab
FlateHuffmanTab distCodeTab
GBool compressedBlock
int blockLen
GBool endOfBlock
GBool eof

Static Private Attributes

static int codeLenCodeMap [flateMaxCodeLenCodes]
static FlateDecode lengthDecode [flateMaxLitCodes-257]
static FlateDecode distDecode [flateMaxDistCodes]

Constructor & Destructor Documentation

FlateStream::FlateStream Stream strA,
int  predictor,
int  columns,
int  colors,
int  bits
 

Definition at line 2922 of file Stream.cc.

References NULL, and pred.

FlateStream::~FlateStream  )  [virtual]
 

Definition at line 2932 of file Stream.cc.

References pred, and FilterStream::str.


Member Function Documentation

void FlateStream::compHuffmanCodes FlateHuffmanTab tab,
int  n
[private]
 

Definition at line 3263 of file Stream.cc.

References FlateCode::code, code, FlateHuffmanTab::codes, flateMaxHuffman, FlateCode::len, FlateHuffmanTab::start, and FlateCode::val.

Referenced by loadFixedCodes(), and readDynamicCodes().

int FlateStream::getChar  )  [virtual]
 

Implements Stream.

Definition at line 2975 of file Stream.cc.

References buf, endOfBlock, eof, flateMask, StreamPredictor::getChar(), index, pred, readSome(), and remain.

int FlateStream::getCodeWord int  bits  )  [private]
 

Definition at line 3335 of file Stream.cc.

References codeBuf, codeSize, Stream::getChar(), and FilterStream::str.

Referenced by readDynamicCodes(), readSome(), and startBlock().

int FlateStream::getHuffmanCodeWord FlateHuffmanTab tab  )  [private]
 

Definition at line 3301 of file Stream.cc.

References FlateCode::code, code, codeBuf, FlateHuffmanTab::codes, codeSize, error(), flateMaxHuffman, Stream::getChar(), FilterStream::getPos(), len, FlateHuffmanTab::start, FilterStream::str, and FlateCode::val.

Referenced by readDynamicCodes(), and readSome().

virtual StreamKind FlateStream::getKind  )  [inline, virtual]
 

Implements Stream.

Definition at line 625 of file Stream.h.

References strFlate.

GString * FlateStream::getPSFilter char *  indent  )  [virtual]
 

Reimplemented from Stream.

Definition at line 3021 of file Stream.cc.

References NULL.

int FlateStream::getRawChar  )  [virtual]
 

Reimplemented from Stream.

Definition at line 3007 of file Stream.cc.

References buf, endOfBlock, eof, flateMask, index, readSome(), and remain.

GBool FlateStream::isBinary GBool  last = gTrue  )  [virtual]
 

Implements Stream.

Definition at line 3025 of file Stream.cc.

References gTrue, Stream::isBinary(), and FilterStream::str.

void FlateStream::loadFixedCodes  )  [private]
 

Definition at line 3150 of file Stream.cc.

References allCodes, FlateCode::code, FlateHuffmanTab::codes, compHuffmanCodes(), distCodeTab, flateMaxDistCodes, flateMaxHuffman, flateMaxLitCodes, FlateCode::len, litCodeTab, FlateHuffmanTab::start, and FlateCode::val.

Referenced by startBlock().

int FlateStream::lookChar  )  [virtual]
 

Implements Stream.

Definition at line 2992 of file Stream.cc.

References buf, endOfBlock, eof, index, StreamPredictor::lookChar(), pred, readSome(), and remain.

GBool FlateStream::readDynamicCodes  )  [private]
 

Definition at line 3182 of file Stream.cc.

References allCodes, code, codeLenCodeMap, FlateHuffmanTab::codes, compHuffmanCodes(), distCodeTab, error(), flateMaxCodeLenCodes, flateMaxDistCodes, flateMaxLitCodes, getCodeWord(), getHuffmanCodeWord(), FilterStream::getPos(), gFalse, gTrue, FlateCode::len, len, litCodeTab, and repeat().

Referenced by startBlock().

void FlateStream::readSome  )  [private]
 

Definition at line 3029 of file Stream.cc.

References FlateDecode::bits, blockLen, buf, compressedBlock, distCodeTab, distDecode, endOfBlock, eof, error(), FlateDecode::first, flateMask, flateWindow, Stream::getChar(), getCodeWord(), getHuffmanCodeWord(), FilterStream::getPos(), gTrue, index, len, lengthDecode, litCodeTab, remain, startBlock(), and FilterStream::str.

Referenced by getChar(), getRawChar(), and lookChar().

void FlateStream::reset  )  [virtual]
 

Implements Stream.

Definition at line 2939 of file Stream.cc.

References codeBuf, codeSize, compressedBlock, endOfBlock, eof, error(), Stream::getChar(), FilterStream::getPos(), gFalse, gTrue, index, remain, Stream::reset(), and FilterStream::str.

GBool FlateStream::startBlock  )  [private]
 

Definition at line 3094 of file Stream.cc.

References blockLen, codeBuf, codeSize, compressedBlock, endOfBlock, eof, error(), Stream::getChar(), getCodeWord(), FilterStream::getPos(), gFalse, gTrue, loadFixedCodes(), readDynamicCodes(), and FilterStream::str.

Referenced by readSome().


Member Data Documentation

FlateCode FlateStream::allCodes[flateMaxLitCodes+flateMaxDistCodes] [private]
 

Definition at line 642 of file Stream.h.

Referenced by loadFixedCodes(), and readDynamicCodes().

int FlateStream::blockLen [private]
 

Definition at line 646 of file Stream.h.

Referenced by readSome(), and startBlock().

Guchar FlateStream::buf[flateWindow] [private]
 

Definition at line 636 of file Stream.h.

Referenced by getChar(), getRawChar(), lookChar(), and readSome().

int FlateStream::codeBuf [private]
 

Definition at line 639 of file Stream.h.

Referenced by getCodeWord(), getHuffmanCodeWord(), reset(), and startBlock().

int FlateStream::codeLenCodeMap [static, private]
 

Initial value:

 {
  16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15
}

Definition at line 2853 of file Stream.cc.

Referenced by readDynamicCodes().

int FlateStream::codeSize [private]
 

Definition at line 640 of file Stream.h.

Referenced by getCodeWord(), getHuffmanCodeWord(), reset(), and startBlock().

GBool FlateStream::compressedBlock [private]
 

Definition at line 645 of file Stream.h.

Referenced by readSome(), reset(), and startBlock().

FlateHuffmanTab FlateStream::distCodeTab [private]
 

Definition at line 644 of file Stream.h.

Referenced by loadFixedCodes(), readDynamicCodes(), and readSome().

FlateDecode FlateStream::distDecode [static, private]
 

Definition at line 2889 of file Stream.cc.

Referenced by readSome().

GBool FlateStream::endOfBlock [private]
 

Definition at line 647 of file Stream.h.

Referenced by getChar(), getRawChar(), lookChar(), readSome(), reset(), and startBlock().

GBool FlateStream::eof [private]
 

Definition at line 648 of file Stream.h.

Referenced by getChar(), getRawChar(), lookChar(), readSome(), reset(), and startBlock().

int FlateStream::index [private]
 

Definition at line 637 of file Stream.h.

Referenced by getChar(), getRawChar(), lookChar(), readSome(), and reset().

FlateDecode FlateStream::lengthDecode [static, private]
 

Definition at line 2857 of file Stream.cc.

Referenced by readSome().

FlateHuffmanTab FlateStream::litCodeTab [private]
 

Definition at line 643 of file Stream.h.

Referenced by loadFixedCodes(), readDynamicCodes(), and readSome().

StreamPredictor* FlateStream::pred [private]
 

Definition at line 635 of file Stream.h.

Referenced by FlateStream(), getChar(), lookChar(), and ~FlateStream().

int FlateStream::remain [private]
 

Definition at line 638 of file Stream.h.

Referenced by getChar(), getRawChar(), lookChar(), readSome(), and reset().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:33:00 2005 for OPIE by  doxygen 1.4.2