Package lupos.compression.huffman.tree

Examples of lupos.compression.huffman.tree.Node


    // store in current block
    this.block[this.current]=(byte)b;
    this.current++;
    if(this.current==HuffmanOutputStream.blocksize){
      // one block is complete!
      Node root = this.buildHuffmanTree();
      // encode huffeman tree and the block by using the built huffman tree
      encode(root);
      this.current=0;
    }   
  }
View Full Code Here


 
  @Override
  public void close() throws IOException{
    // Write out the current incomplete block.
    // Even an empty block must be written out by writing out a huffman tree with only the EOF symbol!
    Node root = this.buildHuffmanTree();
    encode(root);
    this.current=0;
    this.out.close();
  }
View Full Code Here

TOP

Related Classes of lupos.compression.huffman.tree.Node

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.