Your SlideShare is downloading. ×
  • Like
H U F M A N Algorithm Index
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

H U F M A N Algorithm Index

  • 406 views
Published

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
406
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
1
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. A ALPH_SIZE - Static variable in interface IHuffConstants The size of the alphabet given the number of bits per chunk, this should be 2^BITS_PER_WORD. B BitInputStream - Class in <Unnamed> Reads bits-at-a-time where the number of bits is between 1 and 32. BitInputStream(String) - Constructor for class BitInputStream Construct a bit-at-a-time input stream from a file whose name is supplied. BitInputStream(File) - Constructor for class BitInputStream Construct a bit-at-a-time input stream from file. BitInputStream(InputStream) - Constructor for class BitInputStream Open a bit-at-a-time stream that reads from supplied InputStream. BitOutputStream - Class in <Unnamed> BitOutputStream(OutputStream) - Constructor for class BitOutputStream Create a stream that writes-through to the OutputStream object passed as a parameter. BitOutputStream(String) - Constructor for class BitOutputStream Construct a bit-at-a-time output stream with specified file name. BITS_PER_INT - Static variable in interface IHuffConstants The standard number of bits needed to represent/store an int, this is 32 in Java and nearly all other languages. BITS_PER_WORD - Static variable in interface IHuffConstants The standard number of bits per chunk/word when huffing. C close() - Method in class BitInputStream Closes the input stream. close() - Method in class BitOutputStream Releases system resources associated with file and flushes bits not yet written. compareTo(TreeNode) - Method in class TreeNode Return value based on comparing this TreeNode to another. compress(File) - Method in class HuffMark compress(InputStream, OutputStream, boolean) - Method in interface IHuffProcessor Compresses input to output, where the same InputStream has previously been pre-processed via preprocessCompress storing state used by this call. compress(InputStream, OutputStream, boolean) - Method in class SimpleHuffProcessor
  • 2. D Diff - Class in <Unnamed> Diff() - Constructor for class Diff doDiffer(File[]) - Static method in class Diff doMark() - Method in class HuffMark doRead() - Method in class HuffViewer F flush() - Method in class BitOutputStream Flushes bits not yet written, must be called by client programs if close isn't called. H Huff - Class in <Unnamed> Main/launch program for Huff assignment. Huff() - Constructor for class Huff HuffMark - Class in <Unnamed> HuffMark() - Constructor for class HuffMark HuffViewer - Class in <Unnamed> The GUI/View for Huffman coding assignment. HuffViewer(String) - Constructor for class HuffViewer I IHuffConstants - Interface in <Unnamed> Global constants used in Huff/Unhuff. IHuffProcessor - Interface in <Unnamed> M MAGIC_NUMBER - Static variable in interface IHuffConstants Isolate the magic number in one place.
  • 3. main(String[]) - Static method in class Diff main(String[]) - Static method in class Huff main(String[]) - Static method in class HuffMark makeFileMenu() - Method in class HuffViewer makeMenus() - Method in class HuffViewer makeMessage() - Method in class HuffViewer makeOptionsMenu() - Method in class HuffViewer makeOutput() - Method in class HuffViewer markSupported() - Method in class BitInputStream Return true if the stream has been initialized from a File and is thus reset-able. myFile - Variable in class HuffViewer myLeft - Variable in class TreeNode myMessage - Variable in class HuffViewer myModel - Variable in class HuffViewer myOutput - Variable in class HuffViewer myRight - Variable in class TreeNode myTitle - Variable in class HuffViewer myValue - Variable in class TreeNode myWeight - Variable in class TreeNode O ourChooser - Static variable in class Diff
  • 4. ourChooser - Static variable in class HuffViewer ourOpenChooser - Static variable in class HuffMark P preprocessCompress(InputStream) - Method in interface IHuffProcessor Preprocess data so that compression is possible --- count characters/create tree/store state so that a subsequent call to compress will work. preprocessCompress(InputStream) - Method in class SimpleHuffProcessor PSEUDO_EOF - Static variable in interface IHuffConstants The value of the PSEUDO_EOF character. R read() - Method in class BitInputStream Required by classes extending InputStream, returns the next byte from this stream as an int value. readBits(int) - Method in class BitInputStream Returns the number of bits requested as rightmost bits in returned value, returns -1 if not enough bits available to satisfy the request. reset() - Method in class BitInputStream Reset stream to beginning. S setModel(IHuffProcessor) - Method in class HuffViewer Associates this view with the given model. setViewer(HuffViewer) - Method in interface IHuffProcessor Make sure this model communicates with some view.
  • 5. setViewer(HuffViewer) - Method in class SimpleHuffProcessor showError(String) - Method in class HuffViewer Show a modal-dialog indicating an error; the user must dismiss the displayed dialog. showMessage(String) - Static method in class Diff showMessage(String) - Method in class HuffViewer Display a text message in the view (e.g., in the small text area at the bottom of the GUI), thus a modeless message the user can ignore. SimpleHuffProcessor - Class in <Unnamed> SimpleHuffProcessor() - Constructor for class SimpleHuffProcessor T TreeNode - Class in <Unnamed> Utility binary-tree (Huffman tree) node for Huffman coding. TreeNode(int, int) - Constructor for class TreeNode construct leaf node (null children) TreeNode(int, int, TreeNode, TreeNode) - Constructor for class TreeNode construct internal node (with children) U uncompress(InputStream, OutputStream) - Method in interface IHuffProcessor Uncompress a previously compressed stream in, writing the uncompressed bits/ data to out. uncompress(InputStream, OutputStream) - Method in class SimpleHuffProcessor update(Collection) - Method in class HuffViewer To be called by model/client code to display strings in the GUI. W write(int) - Method in class BitOutputStream Required by OutputStream subclasses, write the low 8-bits to the underlying outputstream writeBits(int, int) - Method in class BitOutputStream Write specified number of bits from value to a file.