crc_table()
public
Returns the table for calculating CRC checksum as an array.
Show source
static VALUE
rb_zlib_crc_table(VALUE obj)
{
/* z_crc_t is defined since zlib-1.2.7. */
typedef unsigned long z_crc_t;
const z_crc_t *crctbl;
VALUE dst;
int i;
crctbl = get_crc_table();
dst = rb_ary_new2(256);
for (i = 0; i < 256; i++) {
rb_ary_push(dst, rb_uint2inum(crctbl[i]));
}
return dst;
}