CBZip2OutputStream Class Reference

Inherits java::io::OutputStream, and org::apache::tools::bzip2::BZip2Constants.

Collaboration diagram for CBZip2OutputStream:

Collaboration graph
[legend]

List of all members.

Classes

class  StackElem

Public Member Functions

 CBZip2OutputStream (OutputStream inStream, int inBlockSize) throws IOException
 CBZip2OutputStream (OutputStream inStream) throws IOException
void close () throws IOException
void flush () throws IOException
void write (int bv) throws IOException

Protected Member Functions

void finalize () throws Throwable

Static Protected Member Functions

static void hbMakeCodeLengths (char[] len, int[] freq, int alphaSize, int maxLen)

Static Protected Attributes

static final int CLEARMASK = (~SETMASK)
static final int DEPTH_THRESH = 10
static final int GREATER_ICOST = 15
static final int LESSER_ICOST = 0
static final int QSORT_STACK_SIZE = 1000
static final int SETMASK = (1 << 21)
static final int SMALL_THRESH = 20

Package Attributes

boolean blockRandomised
int blockSize100k
int bsBuff
int bsLive
int bytesOut
boolean closed = false
int last
CRC mCrc = new CRC()
int origPtr

Private Member Functions

void allocateCompressStructures ()
void bsFinishedWithStream () throws IOException
void bsPutint (int u) throws IOException
void bsPutIntVS (int numBits, int c) throws IOException
void bsPutUChar (int c) throws IOException
void bsSetStream (OutputStream f)
void bsW (int n, int v) throws IOException
void doReversibleTransformation ()
void endBlock () throws IOException
void endCompression () throws IOException
boolean fullGtU (int i1, int i2)
void generateMTFValues ()
void hbAssignCodes (int[] code, char[] length, int minLen, int maxLen, int alphaSize)
void initBlock ()
void initialize () throws IOException
void mainSort ()
void makeMaps ()
char med3 (char a, char b, char c)
void moveToFrontCodeAndSend () throws IOException
void qSort3 (int loSt, int hiSt, int dSt)
void randomiseBlock ()
void sendMTFValues () throws IOException
void simpleSort (int lo, int hi, int d)
void vswap (int p1, int p2, int n)
void writeRun () throws IOException

Static Private Member Functions

static void panic ()

Private Attributes

int allowableBlockSize
char[] block
int blockCRC
OutputStream bsStream
int combinedCRC
int currentChar = -1
boolean firstAttempt
int[] ftab
int[] incs
boolean[] inUse = new boolean[256]
int[] mtfFreq = new int[MAX_ALPHA_SIZE]
int nBlocksRandomised
int nInUse
int nMTF
int[] quadrant
int runLength = 0
char[] selector = new char[MAX_SELECTORS]
char[] selectorMtf = new char[MAX_SELECTORS]
char[] seqToUnseq = new char[256]
short[] szptr
char[] unseqToSeq = new char[256]
int workDone
int workFactor
int workLimit
int[] zptr


Detailed Description

An output stream that compresses into the BZip2 format (without the file header chars) into another stream.

Author:
Keiron Liddle
TODO: Update to BZip2 1.0.1

Constructor & Destructor Documentation

CBZip2OutputStream ( OutputStream  inStream  )  throws IOException

CBZip2OutputStream ( OutputStream  inStream,
int  inBlockSize 
) throws IOException


Member Function Documentation

void allocateCompressStructures (  )  [private]

void bsFinishedWithStream (  )  throws IOException [private]

void bsPutint ( int  u  )  throws IOException [private]

void bsPutIntVS ( int  numBits,
int  c 
) throws IOException [private]

void bsPutUChar ( int  c  )  throws IOException [private]

void bsSetStream ( OutputStream  f  )  [private]

void bsW ( int  n,
int  v 
) throws IOException [private]

void close (  )  throws IOException

void doReversibleTransformation (  )  [private]

void endBlock (  )  throws IOException [private]

void endCompression (  )  throws IOException [private]

void finalize (  )  throws Throwable [protected]

void flush (  )  throws IOException

boolean fullGtU ( int  i1,
int  i2 
) [private]

void generateMTFValues (  )  [private]

void hbAssignCodes ( int[]  code,
char[]  length,
int  minLen,
int  maxLen,
int  alphaSize 
) [private]

static void hbMakeCodeLengths ( char[]  len,
int[]  freq,
int  alphaSize,
int  maxLen 
) [static, protected]

void initBlock (  )  [private]

void initialize (  )  throws IOException [private]

void mainSort (  )  [private]

void makeMaps (  )  [private]

char med3 ( char  a,
char  b,
char  c 
) [private]

void moveToFrontCodeAndSend (  )  throws IOException [private]

static void panic (  )  [static, private]

void qSort3 ( int  loSt,
int  hiSt,
int  dSt 
) [private]

void randomiseBlock (  )  [private]

void sendMTFValues (  )  throws IOException [private]

void simpleSort ( int  lo,
int  hi,
int  d 
) [private]

void vswap ( int  p1,
int  p2,
int  n 
) [private]

void write ( int  bv  )  throws IOException

modified by Oliver Merkel, 010128

void writeRun (  )  throws IOException [private]


Member Data Documentation

int allowableBlockSize [private]

char [] block [private]

int blockCRC [private]

boolean blockRandomised [package]

int blockSize100k [package]

int bsBuff [package]

int bsLive [package]

OutputStream bsStream [private]

int bytesOut [package]

final int CLEARMASK = (~SETMASK) [static, protected]

boolean closed = false [package]

int combinedCRC [private]

int currentChar = -1 [private]

final int DEPTH_THRESH = 10 [static, protected]

boolean firstAttempt [private]

int [] ftab [private]

final int GREATER_ICOST = 15 [static, protected]

int [] incs [private]

Initial value:

 { 1, 4, 13, 40, 121, 364, 1093, 3280,
                           9841, 29524, 88573, 265720,
                           797161, 2391484 }

boolean [] inUse = new boolean[256] [private]

int last [package]

final int LESSER_ICOST = 0 [static, protected]

CRC mCrc = new CRC() [package]

int [] mtfFreq = new int[MAX_ALPHA_SIZE] [private]

int nBlocksRandomised [private]

int nInUse [private]

int nMTF [private]

int origPtr [package]

final int QSORT_STACK_SIZE = 1000 [static, protected]

int [] quadrant [private]

int runLength = 0 [private]

char [] selector = new char[MAX_SELECTORS] [private]

char [] selectorMtf = new char[MAX_SELECTORS] [private]

char [] seqToUnseq = new char[256] [private]

final int SETMASK = (1 << 21) [static, protected]

final int SMALL_THRESH = 20 [static, protected]

short [] szptr [private]

char [] unseqToSeq = new char[256] [private]

int workDone [private]

int workFactor [private]

int workLimit [private]

int [] zptr [private]


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

Generated on Sat May 26 06:43:38 2012 for Project Wonder by  doxygen 1.5.8