Added needed includes
Increased the default chunk size
Updated the function prototype

Few commits back we changed the ctf_section to _section only, as it is intended
to be used only internally.
Removed unnecessary code duplication
Fixed a big with realloc

The problem was that we did not assign the return value of realloc, which might
have changed during all the reallocations.
Added missing condition

Without this the algorithm always fails, as at some point we reach the end of
the stream and hit the Z_STREAM_END value. But this return value is not an
error, just a special OK situation.