Method: Zlib::ZStream#finish
- Defined in:
- zlib.c
#finish ⇒ String #finish {|chunk| ... } ⇒ nil
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.
1299 1300 1301 1302 1303 1304 1305 1306 1307 |
# File 'zlib.c', line 1299 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); } |