summaryrefslogtreecommitdiff
path: root/gzip.c
diff options
context:
space:
mode:
Diffstat (limited to 'gzip.c')
-rw-r--r--gzip.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gzip.c b/gzip.c
index add94d0..2e147b1 100644
--- a/gzip.c
+++ b/gzip.c
@@ -3380,3 +3380,17 @@ unsigned size;
isize += (ulg) len;
return (int) len;
}
+
+/* ===========================================================================
+ * Write the output buffer outbuf[0..outcnt-1] and update bytes_out.
+ * (used for the compressed data only)
+ */
+void flush_outbuf()
+{
+ if (outcnt == 0)
+ return;
+
+ write_buf(ofd, (char *) outbuf, outcnt);
+ bytes_out += (ulg) outcnt;
+ outcnt = 0;
+}