System.arraycopy(output, 0, zipBytes, 0, compressedDataLength);
ByteArrayInputStream byteInput = new ByteArrayInputStream(zipBytes);
ByteArrayOutputStream byteOutput = new ByteArrayOutputStream();
InflaterWriter writer = new InflaterWriter(byteOutput);
byte[] zipBuffer = new byte[12];
int n = byteInput.read(zipBuffer);
while (n > 0)
{
writer.write(zipBuffer, 0, n);
n = byteInput.read(zipBuffer);
}
writer.close();
byte[] outcome = byteOutput.toByteArray();
String outStr = new String(outcome);
assertEquals(inputString, outStr);