Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
A
B
C
D
E
F
G
H
I
M
R
S
T
V
W
_
A
Arithmetic
- class compress.
Arithmetic
.
Implements arithmetic compression.
Arithmetic()
- Constructor for class compress.
Arithmetic
B
BiTree
- class biTree.
BiTree
.
The concrete instance of WeightCompare that makes up the root and limbs of a binary tree.
biTree(BiTree)
- Method in class biTree.visitor.
GetCode
The method to call on biTrees.
biTree(BiTree)
- Method in class biTree.visitor.
GetCodeHelper
Method to be called on biTrees.
biTree(BiTree)
- Method in class biTree.visitor.
MakeHashTable
Travels through a binary tree on all of the BiTrees
biTree(BiTree)
- Method in interface biTree.visitor.
Visitor
The method to call on BiTrees
BiTree(WeightCompare, WeightCompare)
- Constructor for class biTree.
BiTree
Constructor for BiTree
BitsToFile
- class compress.
BitsToFile
.
Behavior class.
BitsToFile(FileOutputStream)
- Constructor for class compress.
BitsToFile
Constructor.
C
compareTo(Object)
- Method in class biTree.
BiTree
The required compareTo method from Comparable.
compareTo(Object)
- Method in class biTree.
Symbol
The required compareTo method from Comparable.
compareTo(Object)
- Method in interface biTree.
WeightCompare
The required compareTo method from Comparable.
CompressAlgo
- class compress.
CompressAlgo
.
The abstract class of compression algorithms.
CompressAlgo()
- Constructor for class compress.
CompressAlgo
D
decode(File)
- Method in class compress.
Arithmetic
decode(File)
- Method in class compress.
CompressAlgo
Decodes the given file.
decode(File)
- Method in class compress.
Huff
Decodes fileIn.
E
encode(File)
- Method in class compress.
Arithmetic
Encodes fileIn using Arithmetic coding and gives back the encoded file with a .cac attatched to the name.
encode(File)
- Method in class compress.
CompressAlgo
Encodes the given file.
encode(File)
- Method in class compress.
Huff
Encodes fileIn using Huffman coding and gives back the encoded file with a .ccc attatched to the name.
execute(FileInputStream, FileOutputStream, Vector)
- Method in class compress.
ReadIn
This method comprises the entire behavior of the class.
execute(Vector)
- Method in class compress.
BitsToFile
Writes a vector of bits to the file.
execute(Vector)
- Method in class compress.
VecToTree
Converts the given vector of WeightCompares into a binary tree of WeightCompares
execute(Visitor)
- Method in class biTree.
BiTree
The hook for my visitors
execute(Visitor)
- Method in class biTree.
Symbol
The hook for my visitors
execute(Visitor)
- Method in interface biTree.
WeightCompare
The hook method for visitors
F
finishUp()
- Method in class compress.
BitsToFile
When we get to the end of a file, we need to write the last vector, even though it may not be full.
G
GetCode
- class biTree.visitor.
GetCode
.
A visitor on WeightCompares that gets a value for a given code by traversing the tree.
GetCode(Vector, FileInputStream, IntWrapper)
- Constructor for class biTree.visitor.
GetCode
Constructor
GetCodeHelper
- class biTree.visitor.
GetCodeHelper
.
Helper for the GetCode visitor
GetCodeHelper(Vector, FileInputStream, IntWrapper)
- Constructor for class biTree.visitor.
GetCodeHelper
Constructor
getLeftChild()
- Method in class biTree.
BiTree
Getter for left child
getRightChild()
- Method in class biTree.
BiTree
Getter for right child
getValue()
- Method in class biTree.
Symbol
Getter for the value
getValue()
- Method in class compress.
IntWrapper
Gets the value of the IntWrapper
getWeight()
- Method in class biTree.
BiTree
Getter for weight
getWeight()
- Method in class biTree.
Symbol
Getter for the weight
getWeight()
- Method in interface biTree.
WeightCompare
The getter method for the weight
H
Huff
- class compress.
Huff
.
A concrete CompressAlgo for Huffman coding
Huff()
- Constructor for class compress.
Huff
I
incWeight()
- Method in class biTree.
Symbol
Increments the weight by one
IntWrapper
- class compress.
IntWrapper
.
Wraps around a primitive int so that it can be passed by reference instead of by value.
IntWrapper()
- Constructor for class compress.
IntWrapper
M
main(String[])
- Static method in class
Test
MakeHashTable
- class biTree.visitor.
MakeHashTable
.
Visitor on WeightCompare to make a hashtable from a given tree.
MakeHashTable(Hashtable)
- Constructor for class biTree.visitor.
MakeHashTable
Constructor
R
ReadIn
- class compress.
ReadIn
.
This class reads in a file and puts the letters and relative frequencies into a vector.
ReadIn()
- Constructor for class compress.
ReadIn
S
setValue(int)
- Method in class compress.
IntWrapper
Sets the value of the IntWrapper
setWeight(int)
- Method in class biTree.
Symbol
Sets the weight
Singleton
- Static variable in class compress.
Arithmetic
Singleton
- Static variable in class compress.
Huff
Singleton
- Static variable in class compress.
ReadIn
Singleton
- Static variable in class compress.
VecToTree
Singleton pattern
Symbol
- class biTree.
Symbol
.
The leaf node class for our binary tree
Symbol(int)
- Constructor for class biTree.
Symbol
Constructor.
Symbol(int, int)
- Constructor for class biTree.
Symbol
Constructor.
symbol(Symbol)
- Method in class biTree.visitor.
GetCode
The method for Symbols.
symbol(Symbol)
- Method in class biTree.visitor.
GetCodeHelper
Method to be called on symbols.
symbol(Symbol)
- Method in class biTree.visitor.
MakeHashTable
When we get to a Symbol, we just want to return the value of the symbol and the code vector that we have found for that value.
symbol(Symbol)
- Method in interface biTree.visitor.
Visitor
The method to call on Symbols
T
Test
- class
Test
.
Driver to test each of the compression schemes
Test()
- Constructor for class
Test
toString()
- Method in class biTree.
Symbol
A toString method for testing purposes
V
VecToTree
- class compress.
VecToTree
.
This class is a behavior class.
VecToTree()
- Constructor for class compress.
VecToTree
Visitor
- interface biTree.visitor.
Visitor
.
Visitor on WeightCompares
W
WeightCompare
- interface biTree.
WeightCompare
.
This interface exists so I can sort a vector with both BiTrees and Symbols in it.
_
_byteVector
- Variable in class biTree.visitor.
GetCode
_byteVector
- Variable in class biTree.visitor.
GetCodeHelper
_fstreamIn
- Variable in class biTree.visitor.
GetCode
_fstreamIn
- Variable in class biTree.visitor.
GetCodeHelper
_fstreamOut
- Variable in class compress.
BitsToFile
_hash
- Variable in class biTree.visitor.
MakeHashTable
_indexToSet
- Variable in class biTree.visitor.
MakeHashTable
_leftChild
- Variable in class biTree.
BiTree
_offset
- Variable in class compress.
BitsToFile
_offsetIncrementor
- Variable in class compress.
BitsToFile
_oneCode
- Variable in class biTree.visitor.
MakeHashTable
_rightChild
- Variable in class biTree.
BiTree
_singleByte
- Variable in class compress.
BitsToFile
_symbol
- Variable in class biTree.visitor.
GetCode
_symbol
- Variable in class biTree.visitor.
GetCodeHelper
_value
- Variable in class biTree.
Symbol
_value
- Variable in class compress.
IntWrapper
_weight
- Variable in class biTree.
BiTree
_weight
- Variable in class biTree.
Symbol
A
B
C
D
E
F
G
H
I
M
R
S
T
V
W
_
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES