diff --git a/services/hilogd/log_compress.cpp b/services/hilogd/log_compress.cpp index 43109204de884b811dd9ad33b612521a658bd4d9..dc40c7d9d371663fbbecdf50a4b48bf3b8c6dce7 100644 --- a/services/hilogd/log_compress.cpp +++ b/services/hilogd/log_compress.cpp @@ -39,7 +39,7 @@ int ZlibCompress::Compress(const LogPersisterBuffer &inBuffer, LogPersisterBuffe cStream.zalloc = Z_NULL; cStream.zfree = Z_NULL; cStream.opaque = Z_NULL; - if (deflateInit2(&cStream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, MAX_WBITS + 16, 8, Z_DEFAULT_STRATEGY) != Z_OK) { + if (deflateInit(&cStream, Z_DEFAULT_COMPRESSION) != Z_OK) { return -1; } uint32_t zdlen = deflateBound(&cStream, inBuffer.offset);