Method: LZ4::Decoder#getbyte

Defined in:
ext/frameapi.c

#getbyteInteger | nil

Read one byte code integer.

Returns:

  • (Integer | nil)


649
650
651
652
653
654
655
656
657
658
659
660
661
# File 'ext/frameapi.c', line 649

static VALUE
fdec_getbyte(VALUE dec)
{
    struct decoder *p = getdecoder(dec);

    char ch;
    size_t s = fdec_read_decode(dec, p, &ch, 1);
    if (s > 0) {
        return INT2FIX(ch);
    } else {
        return Qnil;
    }
}