From d46559398fbeae19ae3205f346bcb1c848a89470 Mon Sep 17 00:00:00 2001 From: Nathan Moinvaziri Date: Tue, 20 Nov 2018 03:18:22 -0800 Subject: [PATCH] Allow decompression even though zero bytes read. --- mz_strm_bzip.c | 2 -- mz_strm_lzma.c | 2 -- mz_strm_zlib.c | 3 --- 3 files changed, 7 deletions(-) diff --git a/mz_strm_bzip.c b/mz_strm_bzip.c index dc35c54..8d52bb4 100644 --- a/mz_strm_bzip.c +++ b/mz_strm_bzip.c @@ -149,8 +149,6 @@ int32_t mz_stream_bzip_read(void *stream, void *buf, int32_t size) if (read < 0) return read; - if (read == 0) - break; bzip->bzstream.next_in = (char *)bzip->buffer; bzip->bzstream.avail_in = (uint32_t)read; diff --git a/mz_strm_lzma.c b/mz_strm_lzma.c index 84e66d4..14f0bfc 100644 --- a/mz_strm_lzma.c +++ b/mz_strm_lzma.c @@ -175,8 +175,6 @@ int32_t mz_stream_lzma_read(void *stream, void *buf, int32_t size) if (read < 0) return read; - if (read == 0) - break; lzma->lstream.next_in = lzma->buffer; lzma->lstream.avail_in = (size_t)read; diff --git a/mz_strm_zlib.c b/mz_strm_zlib.c index 6a6e452..079fa25 100644 --- a/mz_strm_zlib.c +++ b/mz_strm_zlib.c @@ -155,9 +155,6 @@ int32_t mz_stream_zlib_read(void *stream, void *buf, int32_t size) if (read < 0) return read; - if (read == 0) - break; - zlib->zstream.next_in = zlib->buffer; zlib->zstream.avail_in = read; }