}
public byte[] decompress(byte[] compressedBytes) {
try {
ByteArrayInputStream bytesIn = new ByteArrayInputStream(compressedBytes);
HuffmanDecoder decoder = new HuffmanDecoder(codeModel.createModel(), bytesIn);
SubstringUnpacker unpacker = new SubstringUnpacker(dictionary);
int nextSymbol;
while ((nextSymbol = decoder.decodeSymbol()) != -1) {
if (nextSymbol > 255) {
int length = nextSymbol - 256;
int offset = decoder.decodeSymbol() | (decoder.decodeSymbol() << 4) | (decoder.decodeSymbol() << 8) | (decoder.decodeSymbol() << 12);
offset = -offset;
unpacker.encodeSubstring(offset, length, null);
}
else {
unpacker.encodeLiteral(nextSymbol, null);