Method: Zlib::GzipReader#getbyte
- Defined in:
- zlib.c
#getbyte ⇒ Object
See Zlib::GzipReader documentation for a description.
4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 |
# File 'zlib.c', line 4170 static VALUE rb_gzreader_getbyte(VALUE obj) { struct gzfile *gz = get_gzfile(obj); VALUE dst; dst = gzfile_read(gz, 1, Qnil); if (!NIL_P(dst)) { dst = INT2FIX((unsigned int)(RSTRING_PTR(dst)[0]) & 0xff); } return dst; } |