finish()
Finishes the stream and flushes output buffer. If a block is given each chunk is yielded to the block until the input buffer has been flushed to the output buffer.
static VALUE rb_zstream_finish(VALUE obj) { struct zstream *z = get_zstream(obj); zstream_run(z, (Bytef*)"", 0, Z_FINISH); return zstream_detach_buffer(z); }