Commit Diff


commit - 8e6b519113fd229ada380cf80ac5535ff6d3903d
commit + 4834ca9697f0ad310b1608d2ca08a667742c5d7c
blob - 083cd850bccb87b8f71244429cd970ba60b9ead0
blob + 066d18218edd647aad7e65766f3fa60dbfd0c592
--- lib/got_zbuf_lib.h
+++ lib/got_zbuf_lib.h
@@ -24,6 +24,8 @@ struct got_zstream_buf {
 #define GOT_ZSTREAM_F_HAVE_MORE 0x01
 };
 
+#define GOT_ZSTREAM_BUFSIZE	8192
+
 const struct got_error *got_inflate_init(struct got_zstream_buf *, size_t);
 const struct got_error *got_inflate_read(struct got_zstream_buf *, FILE *,
     size_t *);
blob - dcdf5a7af79f2a7ba05e0da2f7131c5e2623d3d0
blob + 4d83cf85804bb62caf73741c8b7aabcc09a4aa44
--- lib/zbuf.c
+++ lib/zbuf.c
@@ -115,7 +115,7 @@ got_inflate_to_mem(uint8_t **outbuf, size_t *outlen, F
 	struct got_zstream_buf zb;
 	void *newbuf;
 
-	err = got_inflate_init(&zb, 8192);
+	err = got_inflate_init(&zb, GOT_ZSTREAM_BUFSIZE);
 	if (err)
 		return err;
 
@@ -153,7 +153,7 @@ got_inflate_to_file(size_t *outlen, FILE *infile, FILE
 	size_t avail;
 	struct got_zstream_buf zb;
 
-	err = got_inflate_init(&zb, 8192);
+	err = got_inflate_init(&zb, GOT_ZSTREAM_BUFSIZE);
 	if (err)
 		goto done;