Ruby 1.9.3p327(2012-11-10revision37606)
|
Go to the source code of this file.
#define ARG_FLUSH | ( | val | ) | FIXNUMARG((val), Z_NO_FLUSH) |
Definition at line 1238 of file zlib.c.
Referenced by rb_deflate_deflate().
#define ARG_LEVEL | ( | val | ) | FIXNUMARG((val), Z_DEFAULT_COMPRESSION) |
Definition at line 1234 of file zlib.c.
Referenced by rb_deflate_initialize(), rb_deflate_params(), rb_deflate_s_deflate(), and rb_gzwriter_initialize().
#define ARG_MEMLEVEL | ( | val | ) | FIXNUMARG((val), DEF_MEM_LEVEL) |
Definition at line 1236 of file zlib.c.
Referenced by rb_deflate_initialize().
#define ARG_STRATEGY | ( | val | ) | FIXNUMARG((val), Z_DEFAULT_STRATEGY) |
Definition at line 1237 of file zlib.c.
Referenced by rb_deflate_initialize(), rb_deflate_params(), and rb_gzwriter_initialize().
#define ARG_WBITS | ( | val | ) | FIXNUMARG((val), MAX_WBITS) |
Definition at line 1235 of file zlib.c.
Referenced by rb_deflate_initialize(), and rb_inflate_initialize().
Definition at line 349 of file zlib.c.
Referenced by do_checksum(), gzfile_calc_crc(), and gzfile_write().
#define DEF_MEM_LEVEL MAX_MEM_LEVEL |
Definition at line 41 of file zlib.c.
Referenced by Init_zlib(), and rb_gzwriter_initialize().
#define FIXNUMARG | ( | val, | |
ifnil | |||
) |
(NIL_P((val)) ? (ifnil) \ : ((void)Check_Type((val), T_FIXNUM), FIX2INT((val))))
Definition at line 1230 of file zlib.c.
Referenced by rb_deflate_flush(), and rb_gzwriter_flush().
#define GZ_EXTRAFLAG_FAST 0x4 |
Definition at line 1923 of file zlib.c.
Referenced by gzfile_make_header(), and gzfile_read_header().
#define GZ_EXTRAFLAG_SLOW 0x2 |
Definition at line 1924 of file zlib.c.
Referenced by gzfile_make_header(), and gzfile_read_header().
#define GZ_FLAG_COMMENT 0x10 |
Definition at line 1919 of file zlib.c.
Referenced by gzfile_make_header(), and gzfile_read_header().
#define GZ_FLAG_ENCRYPT 0x20 |
Definition at line 1920 of file zlib.c.
Referenced by gzfile_read_header().
#define GZ_FLAG_EXTRA 0x4 |
Definition at line 1917 of file zlib.c.
Referenced by gzfile_read_header().
#define GZ_FLAG_MULTIPART 0x2 |
Definition at line 1916 of file zlib.c.
Referenced by gzfile_read_header().
#define GZ_FLAG_ORIG_NAME 0x8 |
Definition at line 1918 of file zlib.c.
Referenced by gzfile_make_header(), and gzfile_read_header().
#define GZ_FLAG_UNKNOWN_MASK 0xc0 |
Definition at line 1921 of file zlib.c.
Referenced by gzfile_read_header().
#define GZ_MAGIC1 0x1f |
Definition at line 1913 of file zlib.c.
Referenced by gzfile_make_header(), and gzfile_read_header().
#define GZ_MAGIC2 0x8b |
Definition at line 1914 of file zlib.c.
Referenced by gzfile_make_header(), and gzfile_read_header().
#define GZ_METHOD_DEFLATE 8 |
Definition at line 1915 of file zlib.c.
Referenced by gzfile_make_header(), and gzfile_read_header().
#define GZFILE_CBUF_CAPA 10 |
Definition at line 1975 of file zlib.c.
Referenced by gzfile_getc().
#define GZFILE_FLAG_FOOTER_FINISHED (ZSTREAM_FLAG_UNUSED << 2) |
Definition at line 1979 of file zlib.c.
Referenced by gzfile_check_footer(), gzfile_fill(), gzfile_getc(), gzfile_make_footer(), gzfile_read_all(), gzfile_reader_end_run(), gzfile_reader_get_unused(), and gzfile_readpartial().
#define GZFILE_FLAG_HEADER_FINISHED (ZSTREAM_FLAG_UNUSED << 1) |
Definition at line 1978 of file zlib.c.
Referenced by gzfile_make_header(), gzfile_write(), gzfile_writer_end_run(), rb_gzfile_set_comment(), rb_gzfile_set_mtime(), and rb_gzfile_set_orig_name().
#define GZFILE_FLAG_SYNC ZSTREAM_FLAG_UNUSED |
Definition at line 1977 of file zlib.c.
Referenced by gzfile_write(), gzfile_write_raw(), rb_gzfile_set_sync(), and rb_gzfile_sync().
#define GZFILE_IS_FINISHED | ( | gz | ) | (ZSTREAM_IS_FINISHED(&(gz)->z) && (gz)->z.buf_filled == 0) |
Definition at line 1981 of file zlib.c.
Referenced by gzfile_fill(), gzfile_getc(), gzfile_read_all(), gzfile_reader_end_run(), gzfile_reader_get_unused(), gzfile_readpartial(), gzreader_gets(), gzreader_skip_linebreaks(), and rb_gzfile_eof_p().
#define GZFILE_READ_SIZE 2048 |
Definition at line 1984 of file zlib.c.
Referenced by gzfile_read_raw_partial(), and gzfile_read_raw_rescue().
#define gzfile_reader_new | ( | gz | ) | gzfile_new((gz),&inflate_funcs,gzfile_reader_end) |
Definition at line 2048 of file zlib.c.
Referenced by rb_gzreader_s_allocate().
#define gzfile_writer_new | ( | gz | ) | gzfile_new((gz),&deflate_funcs,gzfile_writer_end) |
Definition at line 2047 of file zlib.c.
Referenced by rb_gzwriter_s_allocate().
#define MAX_UINT | ( | n | ) | (uInt)(n) |
Definition at line 54 of file zlib.c.
Referenced by zstream_expand_buffer_into(), zstream_run(), and zstream_sync().
#define OS_AMIGA 0x01 |
Definition at line 1928 of file zlib.c.
Referenced by Init_zlib().
#define OS_ATARI 0x05 |
Definition at line 1931 of file zlib.c.
Referenced by Init_zlib().
#define OS_CODE OS_UNIX |
Definition at line 1945 of file zlib.c.
Referenced by gzfile_new(), and Init_zlib().
#define OS_CPM 0x09 |
Definition at line 1939 of file zlib.c.
Referenced by Init_zlib().
#define OS_MACOS 0x07 |
Definition at line 1933 of file zlib.c.
Referenced by Init_zlib().
#define OS_MSDOS 0x00 |
Definition at line 1927 of file zlib.c.
Referenced by Init_zlib().
#define OS_OS2 0x06 |
Definition at line 1932 of file zlib.c.
Referenced by Init_zlib().
#define OS_QDOS 0x0c |
Definition at line 1940 of file zlib.c.
Referenced by Init_zlib().
#define OS_RISCOS 0x0d |
Definition at line 1941 of file zlib.c.
Referenced by Init_zlib().
#define OS_TOPS20 0x0a |
Definition at line 1934 of file zlib.c.
Referenced by Init_zlib().
#define OS_UNIX 0x03 |
Definition at line 1930 of file zlib.c.
Referenced by Init_zlib().
#define OS_UNKNOWN 0xff |
Definition at line 1942 of file zlib.c.
Referenced by Init_zlib().
#define OS_VMCMS 0x04 |
Definition at line 1937 of file zlib.c.
Referenced by Init_zlib().
#define OS_VMS 0x02 |
Definition at line 1929 of file zlib.c.
Referenced by Init_zlib().
#define OS_WIN32 0x0b |
Definition at line 1935 of file zlib.c.
Referenced by Init_zlib().
#define OS_ZSYSTEM 0x08 |
Definition at line 1938 of file zlib.c.
Referenced by Init_zlib().
#define rb_gzwriter_addstr rb_io_addstr |
Definition at line 3321 of file zlib.c.
Referenced by Init_zlib().
#define rb_gzwriter_print rb_io_print |
Definition at line 3331 of file zlib.c.
Referenced by Init_zlib().
#define rb_gzwriter_printf rb_io_printf |
Definition at line 3326 of file zlib.c.
Referenced by Init_zlib().
#define rb_gzwriter_puts rb_io_puts |
Definition at line 3336 of file zlib.c.
Referenced by Init_zlib().
#define rb_zlib_adler32_combine rb_f_notimplement |
Definition at line 418 of file zlib.c.
Referenced by Init_zlib().
#define rb_zlib_crc32_combine rb_f_notimplement |
Definition at line 456 of file zlib.c.
Referenced by Init_zlib().
#define RUBY_ZLIB_VERSION "0.6.0" |
Definition at line 27 of file zlib.c.
Referenced by Init_zlib().
#define VALGRIND_MAKE_MEM_DEFINED | ( | p, | |
n | |||
) |
Definition at line 23 of file zlib.c.
Referenced by zlib_mem_alloc().
#define zstream_append_buffer2 | ( | z, | |
v | |||
) | zstream_append_buffer((z),(Bytef*)RSTRING_PTR(v),RSTRING_LEN(v)) |
Definition at line 647 of file zlib.c.
Referenced by gzfile_make_header(), rb_inflate_addstr(), rb_inflate_inflate(), and zstream_passthrough_input().
#define zstream_append_input2 | ( | z, | |
v | |||
) |
RB_GC_GUARD(v),\ zstream_append_input((z), (Bytef*)RSTRING_PTR(v), RSTRING_LEN(v))
Definition at line 744 of file zlib.c.
Referenced by gzfile_read_raw_ensure(), and gzfile_read_raw_until_zero().
#define ZSTREAM_AVAIL_OUT_STEP_MAX 16384 |
Definition at line 515 of file zlib.c.
Referenced by zstream_expand_buffer(), and zstream_shift_buffer().
#define ZSTREAM_AVAIL_OUT_STEP_MIN 2048 |
Definition at line 516 of file zlib.c.
Referenced by zstream_expand_buffer().
#define zstream_deflate_new | ( | klass | ) | zstream_new((klass), &deflate_funcs) |
Definition at line 975 of file zlib.c.
Referenced by rb_deflate_s_allocate().
#define ZSTREAM_FLAG_CLOSING 0x8 |
Definition at line 504 of file zlib.c.
Referenced by gzfile_reader_end(), and gzfile_writer_end().
#define ZSTREAM_FLAG_FINISHED 0x4 |
Definition at line 503 of file zlib.c.
Referenced by zstream_run().
#define ZSTREAM_FLAG_IN_STREAM 0x2 |
Definition at line 502 of file zlib.c.
Referenced by zstream_end(), and zstream_run().
#define ZSTREAM_FLAG_READY 0x1 |
Definition at line 501 of file zlib.c.
Referenced by zstream_reset().
#define zstream_inflate_new | ( | klass | ) | zstream_new((klass), &inflate_funcs) |
Definition at line 976 of file zlib.c.
Referenced by rb_inflate_s_allocate().
#define zstream_init_deflate | ( | z | ) | zstream_init((z), &deflate_funcs) |
Definition at line 563 of file zlib.c.
Referenced by rb_deflate_s_deflate().
#define zstream_init_inflate | ( | z | ) | zstream_init((z), &inflate_funcs) |
Definition at line 564 of file zlib.c.
Referenced by rb_inflate_s_inflate().
#define ZSTREAM_INITIAL_BUFSIZE 1024 |
Definition at line 514 of file zlib.c.
Referenced by zstream_expand_buffer().
#define ZSTREAM_IS_CLOSING | ( | z | ) | ((z)->flags & ZSTREAM_FLAG_CLOSING) |
Definition at line 510 of file zlib.c.
Referenced by gzfile_reader_end(), and gzfile_writer_end().
#define ZSTREAM_IS_FINISHED | ( | z | ) | ((z)->flags & ZSTREAM_FLAG_FINISHED) |
Definition at line 509 of file zlib.c.
Referenced by gzfile_fill(), gzfile_getc(), gzfile_read_all(), gzfile_read_more(), gzfile_readpartial(), gzreader_gets(), rb_inflate_addstr(), rb_inflate_inflate(), and rb_zstream_finished_p().
#define ZSTREAM_IS_READY | ( | z | ) | ((z)->flags & ZSTREAM_FLAG_READY) |
Definition at line 508 of file zlib.c.
Referenced by get_gzfile(), get_zstream(), gzfile_ensure_close(), gzfile_free(), gzfile_reader_get_unused(), rb_zstream_closed_p(), zstream_end(), and zstream_free().
#define ZSTREAM_READY | ( | z | ) | ((z)->flags |= ZSTREAM_FLAG_READY) |
Definition at line 507 of file zlib.c.
Referenced by rb_deflate_initialize(), rb_deflate_s_deflate(), rb_gzreader_initialize(), rb_gzwriter_initialize(), rb_inflate_initialize(), and rb_inflate_s_inflate().
Definition at line 1353 of file zlib.c.
References args, RSTRING_LEN, RSTRING_PTR, zstream_detach_buffer(), and zstream_run().
Referenced by rb_deflate_s_deflate().
Definition at line 353 of file zlib.c.
References checksum_long, func, NIL_P, NUM2ULONG, rb_scan_args(), rb_uint2inum(), RSTRING_LEN, RSTRING_PTR, and StringValue.
Referenced by rb_zlib_adler32(), and rb_zlib_crc32().
Definition at line 1412 of file zlib.c.
References NIL_P, RSTRING_LEN, RSTRING_PTR, StringValue, and zstream_run().
Referenced by rb_deflate_addstr(), and rb_deflate_deflate().
Definition at line 1732 of file zlib.c.
References NIL_P, RSTRING_LEN, RSTRING_PTR, zstream::stream, StringValue, and zstream_run().
Referenced by rb_inflate_addstr(), and rb_inflate_inflate().
static void finalizer_warn | ( | const char * | msg | ) | [static] |
Definition at line 311 of file zlib.c.
Referenced by gzfile_free(), and zstream_finalize().
Definition at line 2682 of file zlib.c.
References Data_Get_Struct, rb_raise(), gzfile::z, and ZSTREAM_IS_READY.
Referenced by gzreader_gets(), rb_gzfile_close(), rb_gzfile_comment(), rb_gzfile_crc(), rb_gzfile_eof_p(), rb_gzfile_finish(), rb_gzfile_level(), rb_gzfile_lineno(), rb_gzfile_mtime(), rb_gzfile_orig_name(), rb_gzfile_os_code(), rb_gzfile_set_comment(), rb_gzfile_set_lineno(), rb_gzfile_set_mtime(), rb_gzfile_set_orig_name(), rb_gzfile_set_sync(), rb_gzfile_sync(), rb_gzfile_to_io(), rb_gzfile_total_in(), rb_gzfile_total_out(), rb_gzreader_getbyte(), rb_gzreader_getc(), rb_gzreader_read(), rb_gzreader_readpartial(), rb_gzreader_rewind(), rb_gzreader_ungetbyte(), rb_gzreader_ungetc(), rb_gzwriter_flush(), rb_gzwriter_putc(), and rb_gzwriter_write().
Definition at line 979 of file zlib.c.
References Data_Get_Struct, rb_raise(), and ZSTREAM_IS_READY.
Referenced by rb_deflate_addstr(), rb_deflate_deflate(), rb_deflate_flush(), rb_deflate_init_copy(), rb_deflate_params(), rb_deflate_set_dictionary(), rb_inflate_addstr(), rb_inflate_inflate(), rb_inflate_set_dictionary(), rb_inflate_sync(), rb_inflate_sync_point_p(), rb_zstream_adler(), rb_zstream_data_type(), rb_zstream_end(), rb_zstream_finish(), rb_zstream_finished_p(), rb_zstream_reset(), rb_zstream_set_avail_out(), rb_zstream_total_in(), and rb_zstream_total_out().
Definition at line 2417 of file zlib.c.
References checksum_long, gzfile::crc, RSTRING_LEN, RSTRING_PTR, and gzfile::ungetc.
Referenced by gzfile_getc(), gzfile_read(), gzfile_read_all(), gzfile_readpartial(), gzreader_gets(), and gzreader_skip_linebreaks().
static void gzfile_check_footer | ( | struct gzfile * | gz | ) | [static] |
Definition at line 2355 of file zlib.c.
References gzfile::crc, zstream::flags, GZFILE_FLAG_FOOTER_FINISHED, gzfile_get32(), gzfile_raise(), gzfile_read_raw_ensure(), zstream::input, rb_raise(), RSTRING_PTR, zstream::stream, gzfile::z, and zstream_discard_input().
Referenced by gzfile_fill(), gzfile_getc(), gzfile_read_all(), gzfile_reader_end_run(), gzfile_reader_get_unused(), and gzfile_readpartial().
static void gzfile_close | ( | struct gzfile * | gz, |
int | closeflag | ||
) | [static] |
Definition at line 2065 of file zlib.c.
References gzfile::comment, gzfile::end, gzfile::io, gzfile::orig_name, Qnil, rb_funcall(), and rb_respond_to().
Referenced by gzfile_ensure_close(), rb_gzfile_close(), and rb_gzfile_finish().
Definition at line 2748 of file zlib.c.
References Data_Get_Struct, gzfile_close(), Qnil, gzfile::z, and ZSTREAM_IS_READY.
Referenced by gzfile_wrap().
Definition at line 2204 of file zlib.c.
References input, NIL_P, rb_attr_get(), rb_call_super(), rb_str_append(), rb_str_cat2(), rb_str_inspect(), rb_str_resize(), and RSTRING_LEN.
Referenced by Init_zlib().
static long gzfile_fill | ( | struct gzfile * | gz, |
long | len | ||
) | [static] |
Definition at line 2448 of file zlib.c.
References zstream::buf_filled, zstream::flags, gzfile_check_footer(), GZFILE_FLAG_FOOTER_FINISHED, GZFILE_IS_FINISHED, gzfile_read_more(), rb_eArgError, rb_raise(), gzfile::z, and ZSTREAM_IS_FINISHED.
Referenced by gzfile_read(), gzreader_charboundary(), and gzreader_gets().
static void gzfile_free | ( | struct gzfile * | gz | ) | [static] |
Definition at line 1999 of file zlib.c.
References gzfile::cbuf, finalizer_warn(), zstream::func, xfree(), gzfile::z, zstream_finalize(), and ZSTREAM_IS_READY.
Referenced by gzfile_new().
static unsigned int gzfile_get16 | ( | const unsigned char * | src | ) | [static] |
Definition at line 2160 of file zlib.c.
Referenced by gzfile_read_header().
static unsigned long gzfile_get32 | ( | const unsigned char * | src | ) | [static] |
Definition at line 2169 of file zlib.c.
Referenced by gzfile_check_footer(), and gzfile_read_header().
Definition at line 2544 of file zlib.c.
References ALLOC_N, zstream::buf, buf, zstream::buf_filled, gzfile::cbuf, dp, gzfile::ec, ECONV_AFTER_OUTPUT, ECONV_PARTIAL_INPUT, gzfile::enc, gzfile::enc2, zstream::flags, gzfile_calc_crc(), GZFILE_CBUF_CAPA, gzfile_check_footer(), GZFILE_FLAG_FOOTER_FINISHED, GZFILE_IS_FINISHED, gzfile_newstr(), gzfile_read(), gzfile_read_more(), len, OBJ_TAINT, Qnil, rb_econv_check_error(), rb_econv_convert(), rb_enc_associate(), rb_enc_dummy_p(), rb_enc_mbclen(), rb_enc_mbmaxlen, rb_str_new(), RSTRING_END, RSTRING_PTR, gzfile::z, ZSTREAM_IS_FINISHED, and zstream_shift_buffer().
Referenced by rb_gzreader_getc().
static void gzfile_make_footer | ( | struct gzfile * | gz | ) | [static] |
Definition at line 2263 of file zlib.c.
References buf, gzfile::crc, zstream::flags, GZFILE_FLAG_FOOTER_FINISHED, gzfile_set32(), zstream::stream, gzfile::z, and zstream_append_buffer().
Referenced by gzfile_writer_end_run().
static void gzfile_make_header | ( | struct gzfile * | gz | ) | [static] |
Definition at line 2219 of file zlib.c.
References buf, gzfile::comment, zstream::flags, GZ_EXTRAFLAG_FAST, GZ_EXTRAFLAG_SLOW, GZ_FLAG_COMMENT, GZ_FLAG_ORIG_NAME, GZ_MAGIC1, GZ_MAGIC2, GZ_METHOD_DEFLATE, GZFILE_FLAG_HEADER_FINISHED, gzfile_set32(), gzfile::level, gzfile::mtime, NIL_P, gzfile::orig_name, gzfile::os_code, gzfile::z, zstream_append_buffer(), and zstream_append_buffer2.
Referenced by gzfile_write(), and gzfile_writer_end_run().
static void gzfile_mark | ( | struct gzfile * | gz | ) | [static] |
Definition at line 1988 of file zlib.c.
References gzfile::comment, gzfile::ecopts, gzfile::io, gzfile::orig_name, gzfile::path, rb_gc_mark(), gzfile::z, and zstream_mark().
Referenced by gzfile_new().
static VALUE gzfile_new | ( | VALUE | , |
const struct zstream_funcs * | , | ||
void(*) _((struct gzfile *)) | |||
) | [static] |
static VALUE gzfile_new | ( | VALUE | klass, |
const struct zstream_funcs * | funcs, | ||
void (*)(struct gzfile *) | endfunc | ||
) | [static] |
Definition at line 2016 of file zlib.c.
References gzfile::cbuf, gzfile::comment, gzfile::crc, Data_Make_Struct, gzfile::ec, gzfile::ecflags, gzfile::ecopts, gzfile::enc, gzfile::enc2, gzfile::end, gzfile_free(), gzfile_mark(), gzfile::io, gzfile::level, gzfile::lineno, gzfile::mtime, NULL, gzfile::orig_name, OS_CODE, gzfile::os_code, gzfile::path, Qnil, rb_default_external_encoding(), gzfile::ungetc, gzfile::z, and zstream_init().
Definition at line 2430 of file zlib.c.
References gzfile::ec, gzfile::ecflags, ECONV_PARTIAL_INPUT, gzfile::ecopts, gzfile::enc, gzfile::enc2, OBJ_TAINT, rb_econv_str_convert(), rb_enc_associate(), rb_enc_dummy_p(), and rb_str_conv_enc_opts().
Referenced by gzfile_getc(), gzfile_read_all(), and gzreader_gets().
Definition at line 2189 of file zlib.c.
References zstream::input, NIL_P, rb_exc_new2(), rb_exc_raise(), rb_ivar_set(), rb_str_resurrect(), and gzfile::z.
Referenced by gzfile_check_footer(), and gzfile_read_header().
Definition at line 2467 of file zlib.c.
References gzfile_calc_crc(), gzfile_fill(), Qnil, rb_str_new(), gzfile::z, and zstream_shift_buffer().
Referenced by gzfile_getc(), gzreader_gets(), rb_gzreader_getbyte(), and rb_gzreader_read().
Definition at line 2523 of file zlib.c.
References zstream::flags, gzfile_calc_crc(), gzfile_check_footer(), GZFILE_FLAG_FOOTER_FINISHED, GZFILE_IS_FINISHED, gzfile_newstr(), gzfile_read_more(), OBJ_TAINT, rb_str_new(), gzfile::z, zstream_detach_buffer(), and ZSTREAM_IS_FINISHED.
Referenced by gzreader_gets(), and rb_gzreader_read().
static void gzfile_read_header | ( | struct gzfile * | gz | ) | [static] |
Definition at line 2274 of file zlib.c.
References gzfile::comment, GZ_EXTRAFLAG_FAST, GZ_EXTRAFLAG_SLOW, GZ_FLAG_COMMENT, GZ_FLAG_ENCRYPT, GZ_FLAG_EXTRA, GZ_FLAG_MULTIPART, GZ_FLAG_ORIG_NAME, GZ_FLAG_UNKNOWN_MASK, GZ_MAGIC1, GZ_MAGIC2, GZ_METHOD_DEFLATE, gzfile_get16(), gzfile_get32(), gzfile_raise(), gzfile_read_raw_ensure(), gzfile_read_raw_until_zero(), zstream::input, len, gzfile::level, gzfile::mtime, OBJ_TAINT, gzfile::orig_name, gzfile::os_code, Qnil, rb_raise(), rb_str_new(), RSTRING_LEN, RSTRING_PTR, gzfile::z, zstream_discard_input(), and zstream_run().
Referenced by rb_gzreader_initialize().
static long gzfile_read_more | ( | struct gzfile * | gz | ) | [static] |
Definition at line 2395 of file zlib.c.
References zstream::buf_filled, gzfile_read_raw(), NIL_P, rb_raise(), RSTRING_LEN, RSTRING_PTR, gzfile::z, ZSTREAM_IS_FINISHED, and zstream_run().
Referenced by gzfile_fill(), gzfile_getc(), gzfile_read_all(), gzfile_readpartial(), gzreader_gets(), and gzreader_skip_linebreaks().
Definition at line 2119 of file zlib.c.
References gzfile_read_raw_partial(), gzfile_read_raw_rescue(), rb_eEOFError, rb_eNoMethodError, and rb_rescue2().
Referenced by gzfile_read_more(), gzfile_read_raw_ensure(), and gzfile_read_raw_until_zero().
static int gzfile_read_raw_ensure | ( | struct gzfile * | gz, |
long | size | ||
) | [static] |
Definition at line 2127 of file zlib.c.
References gzfile_read_raw(), zstream::input, NIL_P, RSTRING_LEN, gzfile::z, and zstream_append_input2.
Referenced by gzfile_check_footer(), and gzfile_read_header().
Definition at line 2094 of file zlib.c.
References Check_Type, GZFILE_READ_SIZE, INT2FIX, gzfile::io, rb_funcall(), and T_STRING.
Referenced by gzfile_read_raw().
Definition at line 2105 of file zlib.c.
References Check_Type, GZFILE_READ_SIZE, INT2FIX, gzfile::io, NIL_P, Qnil, rb_eNoMethodError, rb_errinfo, rb_funcall(), rb_obj_is_kind_of(), and T_STRING.
Referenced by gzfile_read_raw().
static char * gzfile_read_raw_until_zero | ( | struct gzfile * | gz, |
long | offset | ||
) | [static] |
Definition at line 2140 of file zlib.c.
References gzfile_read_raw(), zstream::input, NIL_P, rb_raise(), RSTRING_LEN, RSTRING_PTR, gzfile::z, and zstream_append_input2.
Referenced by gzfile_read_header().
static void gzfile_reader_end | ( | struct gzfile * | gz | ) | [static] |
Definition at line 2642 of file zlib.c.
References zstream::flags, gzfile_reader_end_run(), rb_ensure(), gzfile::z, zstream_end(), ZSTREAM_FLAG_CLOSING, and ZSTREAM_IS_CLOSING.
Definition at line 2629 of file zlib.c.
References zstream::flags, gzfile_check_footer(), GZFILE_FLAG_FOOTER_FINISHED, GZFILE_IS_FINISHED, Qnil, and gzfile::z.
Referenced by gzfile_reader_end().
Definition at line 2665 of file zlib.c.
References zstream::flags, gzfile_check_footer(), GZFILE_FLAG_FOOTER_FINISHED, GZFILE_IS_FINISHED, zstream::input, NIL_P, OBJ_TAINT, Qnil, rb_str_resurrect(), gzfile::z, and ZSTREAM_IS_READY.
Referenced by rb_gzreader_unused().
static void gzfile_reader_rewind | ( | struct gzfile * | gz | ) | [static] |
Definition at line 2651 of file zlib.c.
References gzfile_reset(), zstream::input, INT2FIX, gzfile::io, NIL_P, rb_funcall(), rb_int2inum(), RSTRING_LEN, zstream::stream, and gzfile::z.
Referenced by rb_gzreader_rewind().
Definition at line 2480 of file zlib.c.
References zstream::buf_filled, zstream::flags, gzfile_calc_crc(), gzfile_check_footer(), GZFILE_FLAG_FOOTER_FINISHED, GZFILE_IS_FINISHED, gzfile_read_more(), NIL_P, OBJ_TAINT, rb_eArgError, rb_eEOFError, rb_raise(), rb_str_new(), rb_str_resize(), RSTRING_LEN, RSTRING_PTR, gzfile::z, ZSTREAM_IS_FINISHED, and zstream_shift_buffer().
Referenced by rb_gzreader_readpartial().
static void gzfile_reset | ( | struct gzfile * | gz | ) | [static] |
Definition at line 2051 of file zlib.c.
References gzfile::crc, gzfile::ec, gzfile::ecflags, gzfile::ecopts, gzfile::enc, gzfile::enc2, gzfile::lineno, OnigEncodingTypeST::name, rb_econv_close(), rb_econv_open_opts(), gzfile::ungetc, gzfile::z, and zstream_reset().
Referenced by gzfile_reader_rewind().
Definition at line 2812 of file zlib.c.
References gzfile_wrap(), gzfile::io, rb_eArgError, rb_file_open_str(), and rb_raise().
Referenced by rb_gzreader_s_open(), and rb_gzwriter_s_open().
static void gzfile_set32 | ( | unsigned long | n, |
unsigned char * | dst | ||
) | [static] |
Definition at line 2180 of file zlib.c.
Referenced by gzfile_make_footer(), and gzfile_make_header().
static void gzfile_ungetbyte | ( | struct gzfile * | gz, |
int | c | ||
) | [static] |
Definition at line 2597 of file zlib.c.
References gzfile::ungetc, gzfile::z, and zstream_buffer_ungetbyte().
Referenced by rb_gzreader_ungetbyte().
static void gzfile_ungets | ( | struct gzfile * | gz, |
const Bytef * | b, | ||
long | len | ||
) | [static] |
Definition at line 2590 of file zlib.c.
References len, gzfile::ungetc, gzfile::z, and zstream_buffer_ungets().
Referenced by rb_gzreader_ungetc().
Definition at line 2760 of file zlib.c.
References argc, new_wrap_arg_t::argc, argv, new_wrap_arg_t::argv, gzfile_ensure_close(), new_wrap_arg_t::klass, new_wrap(), rb_block_given_p(), rb_class_new_instance(), rb_ensure(), rb_io_close(), rb_jump_tag(), rb_protect(), and rb_yield().
Referenced by gzfile_s_open(), and rb_gzfile_s_wrap().
static void gzfile_write | ( | struct gzfile * | gz, |
Bytef * | str, | ||
long | len | ||
) | [static] |
Definition at line 2380 of file zlib.c.
References checksum_long, gzfile::crc, zstream::flags, GZFILE_FLAG_HEADER_FINISHED, GZFILE_FLAG_SYNC, gzfile_make_header(), gzfile_write_raw(), gzfile::z, and zstream_run().
Referenced by rb_gzwriter_putc(), and rb_gzwriter_write().
static void gzfile_write_raw | ( | struct gzfile * | gz | ) | [static] |
Definition at line 2079 of file zlib.c.
References zstream::buf_filled, zstream::flags, GZFILE_FLAG_SYNC, gzfile::io, OBJ_TAINT, rb_funcall(), rb_respond_to(), gzfile::z, and zstream_detach_buffer().
Referenced by gzfile_write(), gzfile_writer_end_run(), and rb_gzwriter_flush().
static void gzfile_writer_end | ( | struct gzfile * | gz | ) | [static] |
Definition at line 2620 of file zlib.c.
References zstream::flags, gzfile_writer_end_run(), rb_ensure(), gzfile::z, zstream_end(), ZSTREAM_FLAG_CLOSING, and ZSTREAM_IS_CLOSING.
Definition at line 2604 of file zlib.c.
References zstream::flags, GZFILE_FLAG_HEADER_FINISHED, gzfile_make_footer(), gzfile_make_header(), gzfile_write_raw(), Qnil, gzfile::z, and zstream_run().
Referenced by gzfile_writer_end().
static long gzreader_charboundary | ( | struct gzfile * | gz, |
long | n | ||
) | [static] |
Definition at line 3708 of file zlib.c.
References zstream::buf, zstream::buf_filled, gzfile::enc, gzfile_fill(), MBCLEN_CHARFOUND_LEN, MBCLEN_CHARFOUND_P, MBCLEN_NEEDMORE_LEN, MBCLEN_NEEDMORE_P, rb_enc_left_char_head, rb_enc_precise_mbclen(), RSTRING_PTR, and gzfile::z.
Referenced by gzreader_gets().
Definition at line 3729 of file zlib.c.
References zstream::buf, zstream::buf_filled, gzfile::enc, get_gzfile(), gzfile_calc_crc(), gzfile_fill(), GZFILE_IS_FINISHED, gzfile_newstr(), gzfile_read(), gzfile_read_all(), gzfile_read_more(), gzreader_charboundary(), gzreader_skip_linebreaks(), gzfile::lineno, long, memcmp(), NIL_P, NUM2LONG(), Qnil, rb_check_string_type(), rb_enc_mbmaxlen, rb_rs, rb_scan_args(), rb_str_new(), rscheck(), RSTRING_LEN, RSTRING_PTR, StringValue, gzfile::z, ZSTREAM_IS_FINISHED, and zstream_shift_buffer().
Referenced by rb_gzreader_each(), rb_gzreader_gets(), and rb_gzreader_readlines().
static void gzreader_skip_linebreaks | ( | struct gzfile * | gz | ) | [static] |
Definition at line 3670 of file zlib.c.
References zstream::buf, zstream::buf_filled, gzfile_calc_crc(), GZFILE_IS_FINISHED, gzfile_read_more(), RSTRING_PTR, gzfile::z, zstream_detach_buffer(), and zstream_shift_buffer().
Referenced by gzreader_gets().
Definition at line 1677 of file zlib.c.
References args, RSTRING_LEN, RSTRING_PTR, zstream_detach_buffer(), and zstream_run().
Referenced by rb_inflate_s_inflate().
void Init_zlib | ( | void | ) |
Definition at line 4003 of file zlib.c.
References DEF_MEM_LEVEL, gzfile_error_inspect(), INT2FIX, OS_AMIGA, OS_ATARI, OS_CODE, OS_CPM, OS_MACOS, OS_MSDOS, OS_OS2, OS_QDOS, OS_RISCOS, OS_TOPS20, OS_UNIX, OS_UNKNOWN, OS_VMCMS, OS_VMS, OS_WIN32, OS_ZSYSTEM, rb_cObject, rb_define_alloc_func(), rb_define_attr(), rb_define_class_under(), rb_define_const(), rb_define_method(), rb_define_module(), rb_define_module_function(), rb_define_singleton_method(), rb_deflate_addstr(), rb_deflate_deflate(), rb_deflate_flush(), rb_deflate_init_copy(), rb_deflate_initialize(), rb_deflate_params(), rb_deflate_s_allocate(), rb_deflate_s_deflate(), rb_deflate_set_dictionary(), rb_eStandardError, rb_gzfile_close(), rb_gzfile_closed_p(), rb_gzfile_comment(), rb_gzfile_crc(), rb_gzfile_eof_p(), rb_gzfile_finish(), rb_gzfile_level(), rb_gzfile_lineno(), rb_gzfile_mtime(), rb_gzfile_orig_name(), rb_gzfile_os_code(), rb_gzfile_s_wrap(), rb_gzfile_set_comment(), rb_gzfile_set_lineno(), rb_gzfile_set_mtime(), rb_gzfile_set_orig_name(), rb_gzfile_set_sync(), rb_gzfile_sync(), rb_gzfile_to_io(), rb_gzfile_total_in(), rb_gzfile_total_out(), rb_gzreader_each(), rb_gzreader_each_byte(), rb_gzreader_each_char(), rb_gzreader_getbyte(), rb_gzreader_getc(), rb_gzreader_gets(), rb_gzreader_initialize(), rb_gzreader_read(), rb_gzreader_readbyte(), rb_gzreader_readchar(), rb_gzreader_readline(), rb_gzreader_readlines(), rb_gzreader_readpartial(), rb_gzreader_rewind(), rb_gzreader_s_allocate(), rb_gzreader_s_open(), rb_gzreader_ungetbyte(), rb_gzreader_ungetc(), rb_gzreader_unused(), rb_gzwriter_addstr, rb_gzwriter_flush(), rb_gzwriter_initialize(), rb_gzwriter_print, rb_gzwriter_printf, rb_gzwriter_putc(), rb_gzwriter_puts, rb_gzwriter_s_allocate(), rb_gzwriter_s_open(), rb_gzwriter_write(), rb_include_module(), rb_inflate_addstr(), rb_inflate_inflate(), rb_inflate_initialize(), rb_inflate_s_allocate(), rb_inflate_s_inflate(), rb_inflate_set_dictionary(), rb_inflate_sync(), rb_inflate_sync_point_p(), rb_intern, rb_mEnumerable, rb_str_new2(), rb_undef_alloc_func(), rb_zlib_adler32(), rb_zlib_adler32_combine, rb_zlib_crc32(), rb_zlib_crc32_combine, rb_zlib_crc_table(), rb_zlib_version(), rb_zstream_adler(), rb_zstream_avail_in(), rb_zstream_avail_out(), rb_zstream_closed_p(), rb_zstream_data_type(), rb_zstream_end(), rb_zstream_finish(), rb_zstream_finished_p(), rb_zstream_flush_next_in(), rb_zstream_flush_next_out(), rb_zstream_reset(), rb_zstream_set_avail_out(), rb_zstream_total_in(), rb_zstream_total_out(), and RUBY_ZLIB_VERSION.
Definition at line 2741 of file zlib.c.
References new_wrap_arg_t::argc, new_wrap_arg_t::argv, new_wrap_arg_t::klass, and rb_class_new_instance().
Referenced by gzfile_wrap().
NORETURN | ( | static void | gzfile_raisestruct gzfile *, VALUE, const char * | ) |
static NORETURN | ( | void | raise_zlib_errorint, const char * | ) | [static] |
static void raise_zlib_error | ( | int | err, |
const char * | msg | ||
) | [static] |
Definition at line 263 of file zlib.c.
References buf, rb_exc_new2(), rb_exc_raise(), rb_sys_fail(), and snprintf.
Referenced by rb_deflate_init_copy(), rb_deflate_initialize(), rb_deflate_params(), rb_deflate_s_deflate(), rb_deflate_set_dictionary(), rb_gzreader_initialize(), rb_gzwriter_initialize(), rb_inflate_initialize(), rb_inflate_s_inflate(), rb_inflate_set_dictionary(), rb_inflate_sync_point_p(), zstream_end(), zstream_reset(), zstream_run(), and zstream_sync().
Definition at line 1482 of file zlib.c.
References do_deflate(), get_zstream(), and OBJ_INFECT.
Referenced by Init_zlib().
Definition at line 1458 of file zlib.c.
References ARG_FLUSH, do_deflate(), get_zstream(), OBJ_INFECT, rb_scan_args(), and zstream_detach_buffer().
Referenced by Init_zlib().
Definition at line 1502 of file zlib.c.
References FIXNUMARG, get_zstream(), OBJ_INFECT, rb_scan_args(), zstream_detach_buffer(), and zstream_run().
Referenced by Init_zlib().
Definition at line 1332 of file zlib.c.
References zstream::buf, zstream::buf_filled, Data_Get_Struct, err, zstream::flags, get_zstream(), zstream::input, NIL_P, Qnil, raise_zlib_error(), rb_str_dup(), and zstream::stream.
Referenced by Init_zlib().
Definition at line 1306 of file zlib.c.
References ARG_LEVEL, ARG_MEMLEVEL, ARG_STRATEGY, ARG_WBITS, Data_Get_Struct, err, raise_zlib_error(), rb_scan_args(), zstream::stream, and ZSTREAM_READY.
Referenced by Init_zlib().
Definition at line 1539 of file zlib.c.
References ARG_LEVEL, ARG_STRATEGY, zstream::buf_filled, err, get_zstream(), Qnil, raise_zlib_error(), rb_warning(), zstream::stream, and zstream_expand_buffer().
Referenced by Init_zlib().
Definition at line 1386 of file zlib.c.
References ARG_LEVEL, args, deflate_run(), err, OBJ_INFECT, raise_zlib_error(), rb_ensure(), rb_scan_args(), zstream::stream, StringValue, zstream_end(), zstream_init_deflate, and ZSTREAM_READY.
Referenced by Init_zlib().
Definition at line 1581 of file zlib.c.
References err, get_zstream(), OBJ_INFECT, raise_zlib_error(), RSTRING_LENINT, RSTRING_PTR, zstream::stream, and StringValue.
Referenced by Init_zlib().
Definition at line 3019 of file zlib.c.
References get_gzfile(), gzfile_close(), and gzfile::io.
Referenced by Init_zlib().
Definition at line 3054 of file zlib.c.
References Data_Get_Struct, gzfile::io, NIL_P, Qfalse, and Qtrue.
Referenced by Init_zlib().
Definition at line 2904 of file zlib.c.
References gzfile::comment, get_gzfile(), NIL_P, OBJ_TAINT, and rb_str_dup().
Referenced by Init_zlib().
Definition at line 2842 of file zlib.c.
References gzfile::crc, get_gzfile(), and rb_uint2inum().
Referenced by Init_zlib().
Definition at line 3148 of file zlib.c.
References gzfile::ec, gzfile::ecflags, gzfile::ecopts, gzfile::enc, gzfile::enc2, OnigEncodingTypeST::name, NIL_P, NULL, rb_econv_open_opts(), rb_econv_prepare_opts(), and rb_io_extract_encoding_option().
Referenced by rb_gzreader_initialize(), and rb_gzwriter_initialize().
Definition at line 3067 of file zlib.c.
References get_gzfile(), GZFILE_IS_FINISHED, Qfalse, and Qtrue.
Referenced by Init_zlib().
Definition at line 3037 of file zlib.c.
References get_gzfile(), gzfile_close(), and gzfile::io.
Referenced by Init_zlib().
Definition at line 2864 of file zlib.c.
References get_gzfile(), INT2FIX, and gzfile::level.
Referenced by Init_zlib().
Definition at line 2920 of file zlib.c.
References get_gzfile(), INT2NUM(), and gzfile::lineno.
Referenced by Init_zlib().
Definition at line 2853 of file zlib.c.
References get_gzfile(), gzfile::mtime, rb_time_new(), and time_t.
Referenced by Init_zlib().
Definition at line 2887 of file zlib.c.
References get_gzfile(), NIL_P, OBJ_TAINT, gzfile::orig_name, and rb_str_dup().
Referenced by Init_zlib().
Definition at line 2875 of file zlib.c.
References get_gzfile(), INT2FIX, and gzfile::os_code.
Referenced by Init_zlib().
Definition at line 3140 of file zlib.c.
References Data_Get_Struct, and gzfile::path.
Referenced by rb_gzreader_initialize(), and rb_gzwriter_initialize().
Definition at line 2994 of file zlib.c.
References gzfile::comment, zstream::flags, get_gzfile(), GZFILE_FLAG_HEADER_FINISHED, rb_raise(), rb_str_dup(), rb_str_resize(), rb_str_to_str(), RSTRING_LEN, RSTRING_PTR, and gzfile::z.
Referenced by Init_zlib().
Definition at line 2931 of file zlib.c.
References get_gzfile(), gzfile::lineno, and NUM2INT.
Referenced by Init_zlib().
Definition at line 2945 of file zlib.c.
References FIX2INT, FIX2UINT, FIXNUM_P, zstream::flags, get_gzfile(), GZFILE_FLAG_HEADER_FINISHED, gzfile::mtime, rb_big2ulong(), rb_Integer(), rb_raise(), and gzfile::z.
Referenced by Init_zlib().
Definition at line 2970 of file zlib.c.
References zstream::flags, get_gzfile(), GZFILE_FLAG_HEADER_FINISHED, gzfile::orig_name, rb_raise(), rb_str_dup(), rb_str_resize(), rb_str_to_str(), RSTRING_LEN, RSTRING_PTR, and gzfile::z.
Referenced by Init_zlib().
Definition at line 3095 of file zlib.c.
References zstream::flags, get_gzfile(), GZFILE_FLAG_SYNC, RTEST, and gzfile::z.
Referenced by Init_zlib().
Definition at line 3080 of file zlib.c.
References zstream::flags, get_gzfile(), GZFILE_FLAG_SYNC, Qfalse, Qtrue, and gzfile::z.
Referenced by Init_zlib().
Definition at line 2831 of file zlib.c.
References get_gzfile(), and gzfile::io.
Referenced by Init_zlib().
Definition at line 3114 of file zlib.c.
References get_gzfile(), rb_uint2inum(), zstream::stream, and gzfile::z.
Referenced by Init_zlib().
Definition at line 3125 of file zlib.c.
References zstream::buf_filled, get_gzfile(), rb_uint2inum(), zstream::stream, and gzfile::z.
Referenced by Init_zlib().
Definition at line 3889 of file zlib.c.
References gzreader_gets(), NIL_P, rb_yield(), and RETURN_ENUMERATOR.
Referenced by Init_zlib().
Definition at line 3623 of file zlib.c.
References NIL_P, Qnil, rb_gzreader_getbyte(), rb_yield(), and RETURN_ENUMERATOR.
Referenced by Init_zlib().
Definition at line 3605 of file zlib.c.
References NIL_P, Qnil, rb_gzreader_getc(), rb_yield(), and RETURN_ENUMERATOR.
Referenced by Init_zlib().
Definition at line 3571 of file zlib.c.
References get_gzfile(), gzfile_read(), INT2FIX, NIL_P, and RSTRING_PTR.
Referenced by Init_zlib(), rb_gzreader_each_byte(), and rb_gzreader_readbyte().
Definition at line 3542 of file zlib.c.
References get_gzfile(), and gzfile_getc().
Referenced by Init_zlib(), rb_gzreader_each_char(), and rb_gzreader_readchar().
Definition at line 3857 of file zlib.c.
References gzreader_gets(), NIL_P, and rb_lastline_set().
Referenced by Init_zlib(), and rb_gzreader_readline().
Definition at line 3427 of file zlib.c.
References Data_Get_Struct, err, gzfile_read_header(), gzfile::io, gzfile::path, Qnil, raise_zlib_error(), rb_define_singleton_method(), rb_funcall(), rb_gzfile_ecopts(), rb_gzfile_path(), rb_respond_to(), rb_scan_args(), zstream::stream, gzfile::z, and ZSTREAM_READY.
Referenced by Init_zlib().
Definition at line 3488 of file zlib.c.
References get_gzfile(), gzfile_read(), gzfile_read_all(), len, NIL_P, NUM2INT, rb_eArgError, rb_raise(), and rb_scan_args().
Referenced by Init_zlib().
Definition at line 3589 of file zlib.c.
References NIL_P, rb_eEOFError, rb_gzreader_getbyte(), and rb_raise().
Referenced by Init_zlib().
Definition at line 3555 of file zlib.c.
References NIL_P, rb_eEOFError, rb_gzreader_getc(), and rb_raise().
Referenced by Init_zlib().
Definition at line 3873 of file zlib.c.
References NIL_P, rb_eEOFError, rb_gzreader_gets(), and rb_raise().
Referenced by Init_zlib().
Definition at line 3907 of file zlib.c.
References gzreader_gets(), NIL_P, rb_ary_new(), and rb_ary_push().
Referenced by Init_zlib().
Definition at line 3519 of file zlib.c.
References Check_Type, get_gzfile(), gzfile_readpartial(), len, NIL_P, NUM2INT, rb_eArgError, rb_raise(), rb_scan_args(), and T_STRING.
Referenced by Init_zlib().
Definition at line 3461 of file zlib.c.
References get_gzfile(), gzfile_reader_rewind(), and INT2FIX.
Referenced by Init_zlib().
Definition at line 3662 of file zlib.c.
References get_gzfile(), gzfile_ungetbyte(), NUM2CHR(), and Qnil.
Referenced by Init_zlib(), and rb_gzreader_ungetc().
Definition at line 3641 of file zlib.c.
References gzfile::enc2, FIXNUM_P, get_gzfile(), gzfile_ungets(), Qnil, rb_ascii8bit_encoding(), rb_enc_get(), rb_gzreader_ungetbyte(), rb_str_conv_enc(), RSTRING_LEN, RSTRING_PTR, and StringValue.
Referenced by Init_zlib().
Definition at line 3475 of file zlib.c.
References Data_Get_Struct, and gzfile_reader_get_unused().
Referenced by Init_zlib().
Definition at line 3265 of file zlib.c.
References FIXNUMARG, get_gzfile(), gzfile_write_raw(), gzfile::io, rb_funcall(), rb_respond_to(), rb_scan_args(), gzfile::z, and zstream_run().
Referenced by Init_zlib().
Definition at line 3224 of file zlib.c.
References ARG_LEVEL, ARG_STRATEGY, Data_Get_Struct, DEF_MEM_LEVEL, err, gzfile::io, gzfile::level, NIL_P, gzfile::path, Qnil, raise_zlib_error(), rb_check_convert_type(), rb_define_singleton_method(), rb_funcall(), rb_gzfile_ecopts(), rb_gzfile_path(), rb_respond_to(), rb_scan_args(), zstream::stream, T_HASH, gzfile::z, and ZSTREAM_READY.
Referenced by Init_zlib().
Definition at line 3306 of file zlib.c.
References get_gzfile(), gzfile_write(), and NUM2CHR().
Referenced by Init_zlib().
Definition at line 3289 of file zlib.c.
References gzfile::enc2, get_gzfile(), gzfile_write(), INT2FIX, rb_ascii8bit_encoding(), rb_enc_get(), rb_obj_as_string(), rb_str_conv_enc(), RSTRING_LEN, RSTRING_PTR, T_STRING, and TYPE.
Referenced by Init_zlib().
Definition at line 1814 of file zlib.c.
References do_inflate(), get_zstream(), NIL_P, OBJ_INFECT, StringValue, zstream_append_buffer2, ZSTREAM_IS_FINISHED, and zstream_passthrough_input().
Referenced by Init_zlib().
Definition at line 1777 of file zlib.c.
References do_inflate(), get_zstream(), NIL_P, OBJ_INFECT, rb_str_new(), StringValue, zstream_append_buffer2, zstream_detach_buffer(), ZSTREAM_IS_FINISHED, and zstream_passthrough_input().
Referenced by Init_zlib().
Definition at line 1658 of file zlib.c.
References ARG_WBITS, Data_Get_Struct, err, raise_zlib_error(), rb_scan_args(), zstream::stream, and ZSTREAM_READY.
Referenced by Init_zlib().
Definition at line 1709 of file zlib.c.
References args, err, inflate_run(), OBJ_INFECT, raise_zlib_error(), rb_ensure(), zstream::stream, StringValue, zstream_end(), zstream_init_inflate, and ZSTREAM_READY.
Referenced by Init_zlib().
Definition at line 1885 of file zlib.c.
References err, get_zstream(), OBJ_INFECT, raise_zlib_error(), RSTRING_LENINT, RSTRING_PTR, zstream::stream, and StringValue.
Referenced by Init_zlib().
Definition at line 1845 of file zlib.c.
References get_zstream(), OBJ_INFECT, RSTRING_LEN, RSTRING_PTR, StringValue, and zstream_sync().
Referenced by Init_zlib().
Definition at line 1862 of file zlib.c.
References err, get_zstream(), Qfalse, Qtrue, raise_zlib_error(), and zstream::stream.
Referenced by Init_zlib().
Definition at line 465 of file zlib.c.
References rb_ary_new2(), rb_ary_push(), and rb_uint2inum().
Referenced by Init_zlib().
Definition at line 325 of file zlib.c.
References OBJ_TAINT, and rb_str_new2().
Referenced by Init_zlib().
Definition at line 1195 of file zlib.c.
References get_zstream(), rb_uint2inum(), and zstream::stream.
Referenced by Init_zlib().
Definition at line 1155 of file zlib.c.
References Data_Get_Struct, zstream::input, INT2FIX, NIL_P, and RSTRING_LEN.
Referenced by Init_zlib().
Definition at line 1128 of file zlib.c.
References Data_Get_Struct, rb_uint2inum(), and zstream::stream.
Referenced by Init_zlib().
Definition at line 1213 of file zlib.c.
References Data_Get_Struct, Qfalse, Qtrue, and ZSTREAM_IS_READY.
Referenced by Init_zlib().
Definition at line 1186 of file zlib.c.
References get_zstream(), INT2FIX, and zstream::stream.
Referenced by Init_zlib().
Definition at line 1059 of file zlib.c.
References get_zstream(), Qnil, and zstream_end().
Referenced by Init_zlib().
Definition at line 1081 of file zlib.c.
References get_zstream(), OBJ_INFECT, zstream_detach_buffer(), and zstream_run().
Referenced by Init_zlib().
Definition at line 1204 of file zlib.c.
References get_zstream(), Qfalse, Qtrue, and ZSTREAM_IS_FINISHED.
Referenced by Init_zlib().
Definition at line 1097 of file zlib.c.
References Data_Get_Struct, OBJ_INFECT, and zstream_detach_input().
Referenced by Init_zlib().
Definition at line 1112 of file zlib.c.
References Data_Get_Struct, OBJ_INFECT, and zstream_detach_buffer().
Referenced by Init_zlib().
Definition at line 1070 of file zlib.c.
References get_zstream(), Qnil, and zstream_reset().
Referenced by Init_zlib().
Definition at line 1142 of file zlib.c.
References Check_Type, FIX2INT, get_zstream(), size, T_FIXNUM, and zstream_expand_buffer_into().
Referenced by Init_zlib().
Definition at line 1166 of file zlib.c.
References get_zstream(), rb_uint2inum(), and zstream::stream.
Referenced by Init_zlib().
Definition at line 1175 of file zlib.c.
References get_zstream(), rb_uint2inum(), and zstream::stream.
Referenced by Init_zlib().
static void rscheck | ( | const char * | rsptr, |
long | rslen, | ||
VALUE | rs | ||
) | [static] |
Definition at line 3701 of file zlib.c.
References rb_eRuntimeError, rb_raise(), RSTRING_LEN, and RSTRING_PTR.
Referenced by gzreader_gets().
static voidpf zlib_mem_alloc | ( | voidpf | opaque, |
uInt | items, | ||
uInt | size | ||
) | [static] |
Definition at line 528 of file zlib.c.
References VALGRIND_MAKE_MEM_DEFINED, and xmalloc.
Referenced by zstream_init().
static void zlib_mem_free | ( | voidpf | opaque, |
voidpf | address | ||
) | [static] |
static void zstream_append_buffer | ( | struct zstream * | z, |
const Bytef * | src, | ||
long | len | ||
) | [static] |
Definition at line 618 of file zlib.c.
References zstream::buf, zstream::buf_filled, len, NIL_P, rb_str_buf_cat(), rb_str_buf_new(), rb_str_resize(), RBASIC, RSTRING_LEN, RSTRING_PTR, and zstream::stream.
Referenced by gzfile_make_footer(), and gzfile_make_header().
static void zstream_append_input | ( | struct zstream * | z, |
const Bytef * | src, | ||
long | len | ||
) | [static] |
Definition at line 730 of file zlib.c.
References zstream::input, NIL_P, rb_str_buf_cat(), rb_str_buf_new(), and RBASIC.
Referenced by zstream_run(), and zstream_sync().
static void zstream_buffer_ungetbyte | ( | struct zstream * | z, |
int | c | ||
) | [static] |
Definition at line 714 of file zlib.c.
References zstream::buf, zstream::buf_filled, memmove(), NIL_P, RSTRING_LEN, RSTRING_PTR, zstream::stream, and zstream_expand_buffer().
Referenced by gzfile_ungetbyte().
static void zstream_buffer_ungets | ( | struct zstream * | z, |
const Bytef * | b, | ||
unsigned long | len | ||
) | [static] |
Definition at line 697 of file zlib.c.
References zstream::buf, zstream::buf_filled, len, memmove(), NIL_P, RSTRING_LEN, RSTRING_PTR, zstream::stream, and zstream_expand_buffer_into().
Referenced by gzfile_ungets().
Definition at line 651 of file zlib.c.
References zstream::buf, zstream::buf_filled, NIL_P, Qnil, rb_cString, rb_str_new(), rb_str_resize(), RBASIC, and zstream::stream.
Referenced by deflate_run(), gzfile_read_all(), gzfile_write_raw(), gzreader_skip_linebreaks(), inflate_run(), rb_deflate_deflate(), rb_deflate_flush(), rb_inflate_inflate(), rb_zstream_finish(), rb_zstream_flush_next_out(), and zstream_shift_buffer().
Definition at line 777 of file zlib.c.
References zstream::input, NIL_P, Qnil, rb_cString, rb_str_new(), and RBASIC.
Referenced by rb_zstream_flush_next_in().
static void zstream_discard_input | ( | struct zstream * | z, |
long | len | ||
) | [static] |
Definition at line 749 of file zlib.c.
References zstream::input, memmove(), NIL_P, Qnil, rb_str_resize(), RSTRING_LEN, and RSTRING_PTR.
Referenced by gzfile_check_footer(), gzfile_read_header(), and zstream_sync().
Definition at line 811 of file zlib.c.
References zstream::zstream_funcs::end, err, zstream::flags, zstream::func, Qnil, raise_zlib_error(), rb_warning(), zstream::stream, ZSTREAM_FLAG_IN_STREAM, ZSTREAM_IS_READY, zstream_reset(), and zstream_reset_input().
Referenced by gzfile_reader_end(), gzfile_writer_end(), rb_deflate_s_deflate(), rb_inflate_s_inflate(), and rb_zstream_end().
static void zstream_expand_buffer | ( | struct zstream * | z | ) | [static] |
Definition at line 567 of file zlib.c.
References zstream::buf, zstream::buf_filled, NIL_P, rb_str_new(), rb_str_resize(), RBASIC, RSTRING_LEN, RSTRING_PTR, zstream::stream, ZSTREAM_AVAIL_OUT_STEP_MAX, ZSTREAM_AVAIL_OUT_STEP_MIN, and ZSTREAM_INITIAL_BUFSIZE.
Referenced by rb_deflate_params(), zstream_buffer_ungetbyte(), and zstream_run().
static void zstream_expand_buffer_into | ( | struct zstream * | z, |
unsigned long | size | ||
) | [static] |
Definition at line 599 of file zlib.c.
References zstream::buf, zstream::buf_filled, MAX_UINT, NIL_P, rb_str_new(), rb_str_resize(), RBASIC, RSTRING_PTR, and zstream::stream.
Referenced by rb_zstream_set_avail_out(), and zstream_buffer_ungets().
static void zstream_finalize | ( | struct zstream * | z | ) | [static] |
Definition at line 945 of file zlib.c.
References zstream::zstream_funcs::end, err, finalizer_warn(), zstream::func, and zstream::stream.
Referenced by gzfile_free(), and zstream_free().
static void zstream_free | ( | struct zstream * | z | ) | [static] |
Definition at line 955 of file zlib.c.
References xfree(), zstream_finalize(), and ZSTREAM_IS_READY.
Referenced by zstream_new().
static void zstream_init | ( | struct zstream * | z, |
const struct zstream_funcs * | func | ||
) | [static] |
Definition at line 546 of file zlib.c.
References zstream::buf, zstream::buf_filled, zstream::flags, func, zstream::func, zstream::input, Qnil, zstream::stream, zlib_mem_alloc(), and zlib_mem_free().
Referenced by gzfile_new(), and zstream_new().
static void zstream_mark | ( | struct zstream * | z | ) | [static] |
Definition at line 938 of file zlib.c.
References zstream::buf, zstream::input, and rb_gc_mark().
Referenced by gzfile_mark(), and zstream_new().
Definition at line 964 of file zlib.c.
References Data_Make_Struct, zstream_free(), zstream_init(), and zstream_mark().
static void zstream_passthrough_input | ( | struct zstream * | z | ) | [static] |
Definition at line 768 of file zlib.c.
References zstream::input, NIL_P, Qnil, and zstream_append_buffer2.
Referenced by rb_inflate_addstr(), and rb_inflate_inflate().
static void zstream_reset | ( | struct zstream * | z | ) | [static] |
Definition at line 794 of file zlib.c.
References zstream::buf, zstream::buf_filled, err, zstream::flags, zstream::func, Qnil, raise_zlib_error(), zstream::zstream_funcs::reset, zstream::stream, ZSTREAM_FLAG_READY, and zstream_reset_input().
Referenced by gzfile_reset(), rb_zstream_reset(), and zstream_end().
static void zstream_reset_input | ( | struct zstream * | z | ) | [static] |
Definition at line 762 of file zlib.c.
References zstream::input, and Qnil.
Referenced by zstream_end(), zstream_reset(), zstream_run(), and zstream_sync().
static void zstream_run | ( | struct zstream * | z, |
Bytef * | src, | ||
long | len, | ||
int | flush | ||
) | [static] |
Definition at line 834 of file zlib.c.
References zstream::buf_filled, err, zstream::flags, zstream::func, zstream::input, MAX_UINT, NIL_P, Qnil, raise_zlib_error(), RB_GC_GUARD, rb_thread_schedule(), RSTRING_LEN, RSTRING_PTR, zstream::zstream_funcs::run, zstream::stream, zstream_append_input(), zstream_expand_buffer(), ZSTREAM_FLAG_FINISHED, ZSTREAM_FLAG_IN_STREAM, and zstream_reset_input().
Referenced by deflate_run(), do_deflate(), do_inflate(), gzfile_read_header(), gzfile_read_more(), gzfile_write(), gzfile_writer_end_run(), inflate_run(), rb_deflate_flush(), rb_gzwriter_flush(), and rb_zstream_finish().
Definition at line 672 of file zlib.c.
References zstream::buf, zstream::buf_filled, len, memmove(), rb_cString, rb_str_subseq(), RBASIC, RSTRING_LEN, RSTRING_PTR, zstream::stream, ZSTREAM_AVAIL_OUT_STEP_MAX, and zstream_detach_buffer().
Referenced by gzfile_getc(), gzfile_read(), gzfile_readpartial(), gzreader_gets(), and gzreader_skip_linebreaks().
Definition at line 899 of file zlib.c.
References err, zstream::input, MAX_UINT, NIL_P, Qfalse, Qtrue, raise_zlib_error(), rb_str_new(), RSTRING_LEN, RSTRING_PTR, zstream::stream, zstream_append_input(), zstream_discard_input(), and zstream_reset_input().
Referenced by rb_inflate_sync().
VALUE cStreamError [static] |
struct zstream_funcs deflate_funcs [static] |
Definition at line 1948 of file zlib.c.
Referenced by copy_stream_fallback_body(), and Init_IO().
struct zstream_funcs inflate_funcs [static] |