summaryrefslogtreecommitdiff
path: root/tools/source/zcodec
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-05-21 10:59:18 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-05-21 15:30:14 +0200
commit5271e5b01be208a60a295fb06b867eb438387272 (patch)
tree5aeb37e2bdc07475ee1eafafaf17a43801fe4b03 /tools/source/zcodec
parentf5e44ac7e681ef50e333e102ce2aebba0f8b8ecb (diff)
nMemUsage is always MAX_MEM_USAGE
...so just use zlib.h's MAX_MEM_LEVEL directly. Change-Id: I76d73f665df242bfb180b76aa7054cf8ddbe9e67
Diffstat (limited to 'tools/source/zcodec')
-rw-r--r--tools/source/zcodec/zcodec.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/source/zcodec/zcodec.cxx b/tools/source/zcodec/zcodec.cxx
index 4eeac995964a..abed9d5d0cee 100644
--- a/tools/source/zcodec/zcodec.cxx
+++ b/tools/source/zcodec/zcodec.cxx
@@ -37,11 +37,10 @@
static const int gz_magic[2] = { 0x1f, 0x8b }; /* gzip magic header */
-ZCodec::ZCodec( sal_uIntPtr nInBufSize, sal_uIntPtr nOutBufSize, sal_uIntPtr nMemUsage )
+ZCodec::ZCodec( sal_uIntPtr nInBufSize, sal_uIntPtr nOutBufSize )
: mbInit(0)
, mbStatus(false)
, mbFinish(false)
- , mnMemUsage(nMemUsage)
, mpIStm(NULL)
, mpInBuf(NULL)
, mnInBufSize(nInBufSize)
@@ -397,7 +396,7 @@ void ZCodec::ImplInitBuf ( bool nIOFlag )
mbInit = 3;
mbStatus = ( deflateInit2_( PZSTREAM, mnCompressMethod & 0xff, Z_DEFLATED,
- MAX_WBITS, mnMemUsage, ( mnCompressMethod >> 8 ) & 0xff,
+ MAX_WBITS, MAX_MEM_LEVEL, ( mnCompressMethod >> 8 ) & 0xff,
ZLIB_VERSION, sizeof( z_stream ) ) >= 0 );
PZSTREAM->next_out = mpOutBuf = new sal_uInt8[ PZSTREAM->avail_out = mnOutBufSize ];