Method: Zlib::Inflate#sync
- Defined in:
- zlib.c
#sync(string) ⇒ Object
Inputs string into the end of input buffer and skips data until a full flush point can be found. If the point is found in the buffer, this method flushes the buffer and returns false. Otherwise it returns true and the following data of full flush point is preserved in the buffer.
2307 2308 2309 2310 2311 2312 2313 2314 |
# File 'zlib.c', line 2307
static VALUE
rb_inflate_sync(VALUE obj, VALUE src)
{
struct zstream *z = get_zstream(obj);
StringValue(src);
return zstream_sync(z, (Bytef*)RSTRING_PTR(src), RSTRING_LEN(src));
}
|