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.
1286 1287 1288 1289 1290 1291 1292 1293 1294 |
# File 'zlib.c', line 1286
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);
}
|