net.sf.juoserver.protocol
Class Huffman
java.lang.Object
net.sf.juoserver.protocol.Huffman
- All Implemented Interfaces:
- Encoder, MessageCompressor
public class Huffman
- extends Object
- implements Encoder, MessageCompressor
Encoder
which compresses bytes using the Huffman algorithm.
- See Also:
- Wikipedia
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Huffman
public Huffman()
encode
public byte[] encode(byte[] source)
- Description copied from interface:
Encoder
- Encodes a byte array
- Specified by:
encode
in interface Encoder
- Parameters:
source
- byte array to be encoded
- Returns:
- the encoded packet
createMessageCompressor
public Encoder createMessageCompressor()
- Specified by:
createMessageCompressor
in interface MessageCompressor
Copyright © 2010-2012. All Rights Reserved.