Method: Zlib::GzipReader#pos
- Defined in:
- zlib.c
#pos ⇒ Object
Total number of output bytes output so far.
3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 |
# File 'zlib.c', line 3637
static VALUE
rb_gzfile_total_out(VALUE obj)
{
struct gzfile *gz = get_gzfile(obj);
uLong total_out = gz->z.stream.total_out;
long buf_filled = ZSTREAM_BUF_FILLED(&gz->z);
if (total_out >= (uLong)buf_filled) {
return rb_uint2inum(total_out - buf_filled);
} else {
return LONG2FIX(-(buf_filled - (long)total_out));
}
}
|