From 35226d81ac2db45ce514f07d9be60b1dee5d88fe Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 19 Feb 2013 22:44:38 -0500 Subject: Disable TMX parser debugging noise by default. --- (limited to 'src/compression.c') diff --git a/src/compression.c b/src/compression.c index 2dac4e5..b7c8307 100644 --- a/src/compression.c +++ b/src/compression.c @@ -1,6 +1,7 @@ #include #include #include +#include "../config.h" #include "compression.h" #include "logging.h" @@ -48,13 +49,19 @@ decompress(char *src, size_t src_len, char *dest, size_t dest_len) d_stream.next_out = (Bytef *) dest; d_stream.avail_out = dest_len; +#ifdef DEBUG_COMPRESSION debug("Initializing inflation stream..."); +#endif zlib_err(inflateInit2(&d_stream, 15 + 32)); +#ifdef DEBUG_COMPRESSION debug("Inflating %d bytes into up to %d bytes...", src_len, dest_len); +#endif zlib_err(inflate(&d_stream, Z_NO_FLUSH)); +#ifdef DEBUG_COMPRESSION debug("Ending inflation stream..."); +#endif zlib_err(inflateEnd(&d_stream)); } -- cgit v0.9.1