GZIP_SUPPORT
Calculates Alder-32 checksum for string
, and returns updated
value of adler
. If string
is omitted, it returns
the Adler-32 initial value. If adler
is omitted, it assumes
that the initial value is given to adler
.
FIXME: expression.
static VALUE rb_zlib_adler32(int argc, VALUE *argv, VALUE klass) { return do_checksum(argc, argv, adler32); }
Calculates CRC checksum for string
, and returns updated value
of crc
. If string
is omitted, it returns the CRC
initial value. If crc
is omitted, it assumes that the initial
value is given to crc
.
FIXME: expression.
static VALUE rb_zlib_crc32(int argc, VALUE *argv, VALUE klass) { return do_checksum(argc, argv, crc32); }
Returns the table for calculating CRC checksum as an array.
static VALUE rb_zlib_crc_table(VALUE obj) { const unsigned long *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; }
Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.