flush(p1 = v1)
public
This method is equivalent to deflate('', flush). If flush is omitted,
Zlib::SYNC_FLUSH is used as flush. This method is just provided to
improve the readability of your Ruby program.
TODO: document better!
Show source
static VALUE
rb_deflate_flush(int argc, VALUE *argv, VALUE obj)
{
struct zstream *z = get_zstream(obj);
VALUE v_flush, dst;
int flush;
rb_scan_args(argc, argv, "01", &v_flush);
flush = FIXNUMARG(v_flush, Z_SYNC_FLUSH);
if (flush != Z_NO_FLUSH) { /* prevent Z_BUF_ERROR */
zstream_run(z, (Bytef*)"", 0, flush);
}
dst = zstream_detach_buffer(z);
OBJ_INFECT(dst, obj);
return dst;
}