degzip: Calculate 'leeway' the amount past the end of the output
buffer by which the input stream must extend for it not to get
overwritten before it is consumed during inflation.

i.e., if you allocate p=output_size+leeway bytes for the output, and
read the input stream into the end of that buffer, then you can
safely inflate.

'leeway' seems to typically be less than 16 bytes, so the extra
allocation required for the output buffer is trivial.

degzip -H writes a header onto the output file which includes
the leeway value. degzip also prints the leeway to stdout.