Skip to content

Instantly share code, notes, and snippets.

@conorgriffin
Created December 18, 2019 16:30
Show Gist options
  • Save conorgriffin/8d60a8f47daabbd02c6fe311e01e5e7f to your computer and use it in GitHub Desktop.
Save conorgriffin/8d60a8f47daabbd02c6fe311e01e5e7f to your computer and use it in GitHub Desktop.
Alternative solution is to copy what GZIPOutputStream does
public GZIPOutputStream(OutputStream out, int size, boolean syncFlush)
throws IOException
{
super(out, new Deflater(Deflater.DEFAULT_COMPRESSION, true),
size,
syncFlush);
usesDefaultDeflater = true;
writeHeader();
crc.reset();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment