At the very end of inflate() method, I put a log indicating state->last is LAST, and I do see that log about 3 times at the end of successful uncompression, resulting in some 289MB file. I was hoping to see that log per some block, more than 3 times.
inf_leave:
strm->data_type = (int)state->bits + (state->last ? 64 : 0) +
(state->mode == TYPE ? 128 : 0) +
(state->mode == LEN_ || state->mode == COPY_ ? 256 : 0);
**if(state->last) fprintf(stderr, "Fernando: %s() its LAST\n",__func__);**
Bit of background, I am using WinZip to compress and archive the input files, then inside unzip.c's unzReadCurrentFile() calls zlib's inflate(, Z_BLOCK). I am experimenting on Windows. unzOpenCurrentFile() does prepare some stream fields before calling inflateInit2().
So bit perplexed why deflate block boundary is not logged somewhat periodically, I realize there is that unzip.c layer between the application and zlib library.
As detecting the deflate boundary is the first step, so putting some minimum logs to understand how often block boundaries are seen, and of course use of Z_BLOCK in inflate call, also working with a medium size files. Obviously eventual goal is to continue uncompresssion over a reboot.
Appreciate any feedbacks.