parameters.setCompressionLevel(Deflater.BEST_COMPRESSION);
parameters.setOperatingSystem(3);
parameters.setFilename("test3.xml");
parameters.setComment("Test file");
parameters.setModificationTime(System.currentTimeMillis());
GzipCompressorOutputStream out = new GzipCompressorOutputStream(bout, parameters);
out.write(content);
out.flush();
out.close();
GzipCompressorInputStream in = new GzipCompressorInputStream(new ByteArrayInputStream(bout.toByteArray()));
byte[] content2 = IOUtils.toByteArray(in);
Assert.assertArrayEquals("uncompressed content", content, content2);