|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IHuffProcessor
Field Summary |
---|
Fields inherited from interface assignment4.IHuffConstants |
---|
ALPH_SIZE, BITS_PER_INT, BITS_PER_WORD, MAGIC_NUMBER, PSEUDO_EOF, STORE_COUNTS, STORE_CUSTOM, STORE_TREE |
Method Summary | |
---|---|
int |
compress(java.io.InputStream in,
java.io.OutputStream out,
boolean force)
Compresses input to output, where the same InputStream has previously been pre-processed via preprocessCompress
storing state used by this call. |
int |
preprocessCompress(java.io.InputStream in)
Preprocess data so that compression is possible --- count characters/create tree/store state so that a subsequent call to compress will work. |
void |
setViewer(HuffViewer viewer)
Make sure this model communicates with some view. |
int |
uncompress(java.io.InputStream in,
java.io.OutputStream out)
Uncompress a previously compressed stream in, writing the uncompressed bits/data to out. |
Method Detail |
---|
void setViewer(HuffViewer viewer)
viewer
- is the view for communicating.int preprocessCompress(java.io.InputStream in) throws java.io.IOException
in
- is the stream which could be subsequently compressed
java.io.IOException
int compress(java.io.InputStream in, java.io.OutputStream out, boolean force) throws java.io.IOException
preprocessCompress
storing state used by this call.
in
- is the stream being compressed (not a BitInputStream)out
- is bound to a file/stream to which bits are written
for the compressed file (not a BitOutputStream)
java.io.IOException
int uncompress(java.io.InputStream in, java.io.OutputStream out) throws java.io.IOException
in
- is the previously compressed data (not a BitInputStream)out
- is the uncompressed file/stream
java.io.IOException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |