|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.brownsoft.codec.HuffmanMultiplexerBitInputStream
Title: Proyecto Codificacion de Imagenes y Video
Description:
Copyright: Copyright (c) 2004
Company:
Esta clase implementa un bitstream codificado por huffman Se definen 'canales' cada uno de los cuales puede tener su propia tabla de Huffman. Existe un canal especial 'UNENCODED' para el cual no se aplicó la codificación de huffmanCopyright: Copyright (c) 2004
Company:
Nested Class Summary | |
(package private) class |
HuffmanMultiplexerBitInputStream.FSMNode
|
Field Summary | |
private int |
curByte
|
private byte |
curPos
|
static boolean |
DEBUG
|
private int |
elementsLeft
|
private static double |
LOG_2
|
private static int |
MAX_CHANNELS
|
private int |
nextCurByte
|
private int |
nextNextCurByte
|
private static java.lang.StringBuffer |
NO_DEBUG
|
private HuffmanMultiplexerBitInputStream.FSMNode[] |
ROOTs
|
private java.io.InputStream |
stream
|
private static int |
UNENCODED
|
Constructor Summary | |
HuffmanMultiplexerBitInputStream(java.io.InputStream inputStream)
Construye una instancia a partir de un inputStream |
Method Summary | |
private void |
addFsmNode(HuffmanMultiplexerBitInputStream.FSMNode node,
int symbol,
int left)
Agrega un nodo a la maquina de estados finitos |
private int |
decode(HuffmanMultiplexerBitInputStream.FSMNode ROOT)
Ejecuta la maquina de estados para decodificar el próximo caracter |
private int |
getCantBitsNeeded(int size)
|
int |
read(int channel)
Decodifica un simbolo del stream |
private boolean |
readBit()
Lee un bit del stream |
private long |
readBitStream(int size)
Lee size bits del bitStream |
private void |
readDictionaries()
Lee los diccionarios asociados a esta instancia |
private void |
readDictionary(HuffmanMultiplexerBitInputStream.FSMNode ROOT)
|
int |
readUnencoded(int cantBits)
Lee cantBits del stream |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private int curByte
private byte curPos
public static boolean DEBUG
private int elementsLeft
private static final double LOG_2
private static final int MAX_CHANNELS
private int nextCurByte
private int nextNextCurByte
private static final java.lang.StringBuffer NO_DEBUG
private HuffmanMultiplexerBitInputStream.FSMNode[] ROOTs
private java.io.InputStream stream
private static final int UNENCODED
Constructor Detail |
public HuffmanMultiplexerBitInputStream(java.io.InputStream inputStream) throws java.io.IOException
Method Detail |
private void addFsmNode(HuffmanMultiplexerBitInputStream.FSMNode node, int symbol, int left) throws java.io.IOException
node
- el nodeo actual dentro de la FSMleft
- cantidad de bits restantes del codeword
java.io.IOException
private int decode(HuffmanMultiplexerBitInputStream.FSMNode ROOT) throws java.io.IOException
java.io.IOException
private int getCantBitsNeeded(int size)
public int read(int channel) throws java.io.IOException
java.io.IOException
private boolean readBit() throws java.io.IOException
java.io.IOException
private long readBitStream(int size) throws java.io.IOException
size
- Cantidad de bits a leer
java.io.IOException
private void readDictionaries() throws java.io.IOException
java.io.IOException
private void readDictionary(HuffmanMultiplexerBitInputStream.FSMNode ROOT) throws java.io.IOException
java.io.IOException
public int readUnencoded(int cantBits) throws java.io.IOException
java.io.IOException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |