Method: Zlib::ZStream#finish
- Defined in:
-
ext/zstdlib/ruby/zlib-2.2/zlib.c,
ext/zstdlib/ruby/zlib-2.3/zlib.c,
ext/zstdlib/ruby/zlib-2.4/zlib.c,
ext/zstdlib/ruby/zlib-2.5/zlib.c,
ext/zstdlib/ruby/zlib-2.6/zlib.c
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.
1301 1302 1303 1304 1305 1306 1307 1308 1309 |
# File 'ext/zstdlib/ruby/zlib-2.2/zlib.c', line 1301
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);
}
|