int decompressed = decompressor.inflate(output);
if (decompressed == 0)
{
if (decompressor.needsInput())
{
throw new BadPayloadException("Unable to inflate frame, not enough input on frame");
}
if (decompressor.needsDictionary())
{
throw new BadPayloadException("Unable to inflate frame, frame erroneously says it needs a dictionary");
}
}
else
{
accumulator.addChunk(output, 0, decompressed);
}
}
if (LOG.isDebugEnabled())
LOG.debug("Decompressed {}->{} bytes", input.length, accumulator.getLength());
return accumulator;
}
catch (DataFormatException x)
{
throw new BadPayloadException(x);
}
}