byte[] tbuf = new byte[512];
Inflater inf = new Inflater();
inf.reset();
inf.setInput(buf, 1, L - 1);
try {
while (!inf.needsInput()) {
bytes.write(tbuf, 0, inf.inflate(tbuf));
}
} catch (DataFormatException e) {
throw new PngExceptionSoft("Error inflating " + typeToString(type) + " chunk: " + e);
}