if (state == S_HEADER_WRITTEN) {
throw new IllegalStateException("Headers written back to back!");
} else if (state == S_PAYLOAD_WRITTEN) {
closeRecord();
}
entry = new GzipEntry();
entry.magic = GzipConstants.GZIP_MAGIC;
entry.cm = GzipConstants.CM_DEFLATE;
entry.flg = 0;
entry.mtime = System.currentTimeMillis() / 1000;
entry.xfl = 0;