|
@@ -135,6 +135,7 @@ GzipDecompressStream::GzipDecompressStream(InputStream * stream, uint32_t buffer
|
|
|
}
|
|
|
zstream->next_in = NULL;
|
|
|
zstream->avail_in = 0;
|
|
|
+ _eof = false;
|
|
|
}
|
|
|
|
|
|
GzipDecompressStream::~GzipDecompressStream() {
|
|
@@ -155,6 +156,7 @@ int32_t GzipDecompressStream::read(void * buff, uint32_t length) {
|
|
|
if (zstream->avail_in == 0) {
|
|
|
int32_t rd = _stream->read(_buffer, _capacity);
|
|
|
if (rd <= 0) {
|
|
|
+ _eof = true;
|
|
|
size_t wt = zstream->next_out - (Bytef*)buff;
|
|
|
return wt > 0 ? wt : -1;
|
|
|
} else {
|