Ruby  2.4.2p198(2017-09-14revision59899)
Data Structures | Macros | Functions | Variables
zlib.c File Reference
#include <ruby.h>
#include <zlib.h>
#include <time.h>
#include <ruby/io.h>
#include <ruby/thread.h>
Include dependency graph for zlib.c:

Go to the source code of this file.

Data Structures

struct  zstream
 
struct  zstream::zstream_funcs
 
struct  zstream_run_args
 
struct  gzfile
 
struct  new_wrap_arg_t
 

Macros

#define VALGRIND_MAKE_MEM_DEFINED(p, n)   0
 
#define VALGRIND_MAKE_MEM_UNDEFINED(p, n)   0
 
#define RUBY_ZLIB_VERSION   "0.6.0"
 
#define GZIP_SUPPORT   1
 
#define DEF_MEM_LEVEL   MAX_MEM_LEVEL
 
#define MAX_UINT(n)   (uInt)(n)
 
#define checksum_long(func, sum, ptr, len)   (func)((sum), (ptr), (len))
 
#define rb_zlib_adler32_combine   rb_f_notimplement
 
#define rb_zlib_crc32_combine   rb_f_notimplement
 
#define ZSTREAM_FLAG_READY   0x1
 
#define ZSTREAM_FLAG_IN_STREAM   0x2
 
#define ZSTREAM_FLAG_FINISHED   0x4
 
#define ZSTREAM_FLAG_CLOSING   0x8
 
#define ZSTREAM_FLAG_GZFILE
 
#define ZSTREAM_FLAG_UNUSED   0x20
 
#define ZSTREAM_READY(z)   ((z)->flags |= ZSTREAM_FLAG_READY)
 
#define ZSTREAM_IS_READY(z)   ((z)->flags & ZSTREAM_FLAG_READY)
 
#define ZSTREAM_IS_FINISHED(z)   ((z)->flags & ZSTREAM_FLAG_FINISHED)
 
#define ZSTREAM_IS_CLOSING(z)   ((z)->flags & ZSTREAM_FLAG_CLOSING)
 
#define ZSTREAM_IS_GZFILE(z)   ((z)->flags & ZSTREAM_FLAG_GZFILE)
 
#define ZSTREAM_BUF_FILLED(z)   (NIL_P((z)->buf) ? 0 : RSTRING_LEN((z)->buf))
 
#define ZSTREAM_EXPAND_BUFFER_OK   0
 
#define ZSTREAM_INITIAL_BUFSIZE   1024
 
#define ZSTREAM_AVAIL_OUT_STEP_MAX   16384
 
#define ZSTREAM_AVAIL_OUT_STEP_MIN   2048
 
#define zstream_init_deflate(z)   zstream_init((z), &deflate_funcs)
 
#define zstream_init_inflate(z)   zstream_init((z), &inflate_funcs)
 
#define zstream_append_buffer2(z, v)   zstream_append_buffer((z),(Bytef*)RSTRING_PTR(v),RSTRING_LEN(v))
 
#define zstream_append_input2(z, v)
 
#define zstream_deflate_new(klass)   zstream_new((klass), &deflate_funcs)
 
#define zstream_inflate_new(klass)   zstream_new((klass), &inflate_funcs)
 
#define FIXNUMARG(val, ifnil)
 
#define ARG_LEVEL(val)   FIXNUMARG((val), Z_DEFAULT_COMPRESSION)
 
#define ARG_WBITS(val)   FIXNUMARG((val), MAX_WBITS)
 
#define ARG_MEMLEVEL(val)   FIXNUMARG((val), DEF_MEM_LEVEL)
 
#define ARG_STRATEGY(val)   FIXNUMARG((val), Z_DEFAULT_STRATEGY)
 
#define ARG_FLUSH(val)   FIXNUMARG((val), Z_NO_FLUSH)
 
#define GZ_MAGIC1   0x1f
 
#define GZ_MAGIC2   0x8b
 
#define GZ_METHOD_DEFLATE   8
 
#define GZ_FLAG_MULTIPART   0x2
 
#define GZ_FLAG_EXTRA   0x4
 
#define GZ_FLAG_ORIG_NAME   0x8
 
#define GZ_FLAG_COMMENT   0x10
 
#define GZ_FLAG_ENCRYPT   0x20
 
#define GZ_FLAG_UNKNOWN_MASK   0xc0
 
#define GZ_EXTRAFLAG_FAST   0x4
 
#define GZ_EXTRAFLAG_SLOW   0x2
 
#define OS_MSDOS   0x00
 
#define OS_AMIGA   0x01
 
#define OS_VMS   0x02
 
#define OS_UNIX   0x03
 
#define OS_ATARI   0x05
 
#define OS_OS2   0x06
 
#define OS_MACOS   0x07
 
#define OS_TOPS20   0x0a
 
#define OS_WIN32   0x0b
 
#define OS_VMCMS   0x04
 
#define OS_ZSYSTEM   0x08
 
#define OS_CPM   0x09
 
#define OS_QDOS   0x0c
 
#define OS_RISCOS   0x0d
 
#define OS_UNKNOWN   0xff
 
#define OS_CODE   OS_UNIX
 
#define GZFILE_CBUF_CAPA   10
 
#define GZFILE_FLAG_SYNC   ZSTREAM_FLAG_UNUSED
 
#define GZFILE_FLAG_HEADER_FINISHED   (ZSTREAM_FLAG_UNUSED << 1)
 
#define GZFILE_FLAG_FOOTER_FINISHED   (ZSTREAM_FLAG_UNUSED << 2)
 
#define GZFILE_IS_FINISHED(gz)   (ZSTREAM_IS_FINISHED(&(gz)->z) && ZSTREAM_BUF_FILLED(&(gz)->z) == 0)
 
#define GZFILE_READ_SIZE   2048
 
#define gzfile_writer_new(gz)   gzfile_new((gz),&deflate_funcs,gzfile_writer_end)
 
#define gzfile_reader_new(gz)   gzfile_new((gz),&inflate_funcs,gzfile_reader_end)
 
#define rb_gzwriter_addstr   rb_io_addstr
 
#define rb_gzwriter_printf   rb_io_printf
 
#define rb_gzwriter_print   rb_io_print
 
#define rb_gzwriter_puts   rb_io_puts
 
#define OPTHASH_GIVEN_P(opts)   (argc > 0 && !NIL_P((opts) = rb_check_hash_type(argv[argc-1])) && (--argc, 1))
 

Functions

static NORETURN (void raise_zlib_error(int, const char *))
 
static VALUE rb_zlib_version (VALUE)
 
static VALUE do_checksum (int, VALUE *, uLong(*)(uLong, const Bytef *, uInt))
 
static VALUE rb_zlib_adler32 (int, VALUE *, VALUE)
 
static VALUE rb_zlib_crc32 (int, VALUE *, VALUE)
 
static VALUE rb_zlib_crc_table (VALUE)
 
static voidpf zlib_mem_alloc (voidpf, uInt, uInt)
 
static void zlib_mem_free (voidpf, voidpf)
 
static void finalizer_warn (const char *)
 
static void zstream_init (struct zstream *, const struct zstream_funcs *)
 
static void zstream_expand_buffer (struct zstream *)
 
static void zstream_expand_buffer_into (struct zstream *, unsigned long)
 
static int zstream_expand_buffer_non_stream (struct zstream *z)
 
static void zstream_append_buffer (struct zstream *, const Bytef *, long)
 
static VALUE zstream_detach_buffer (struct zstream *)
 
static VALUE zstream_shift_buffer (struct zstream *, long)
 
static void zstream_buffer_ungets (struct zstream *, const Bytef *, unsigned long)
 
static void zstream_buffer_ungetbyte (struct zstream *, int)
 
static void zstream_append_input (struct zstream *, const Bytef *, long)
 
static void zstream_discard_input (struct zstream *, long)
 
static void zstream_reset_input (struct zstream *)
 
static void zstream_passthrough_input (struct zstream *)
 
static VALUE zstream_detach_input (struct zstream *)
 
static void zstream_reset (struct zstream *)
 
static VALUE zstream_end (struct zstream *)
 
static void zstream_run (struct zstream *, Bytef *, long, int)
 
static VALUE zstream_sync (struct zstream *, Bytef *, long)
 
static void zstream_mark (void *)
 
static void zstream_free (void *)
 
static VALUE zstream_new (VALUE, const struct zstream_funcs *)
 
static struct zstreamget_zstream (VALUE)
 
static void zstream_finalize (struct zstream *)
 
static VALUE rb_zstream_end (VALUE)
 
static VALUE rb_zstream_reset (VALUE)
 
static VALUE rb_zstream_finish (VALUE)
 
static VALUE rb_zstream_flush_next_in (VALUE)
 
static VALUE rb_zstream_flush_next_out (VALUE)
 
static VALUE rb_zstream_avail_out (VALUE)
 
static VALUE rb_zstream_set_avail_out (VALUE, VALUE)
 
static VALUE rb_zstream_avail_in (VALUE)
 
static VALUE rb_zstream_total_in (VALUE)
 
static VALUE rb_zstream_total_out (VALUE)
 
static VALUE rb_zstream_data_type (VALUE)
 
static VALUE rb_zstream_adler (VALUE)
 
static VALUE rb_zstream_finished_p (VALUE)
 
static VALUE rb_zstream_closed_p (VALUE)
 
static VALUE rb_deflate_s_allocate (VALUE)
 
static VALUE rb_deflate_initialize (int, VALUE *, VALUE)
 
static VALUE rb_deflate_init_copy (VALUE, VALUE)
 
static VALUE deflate_run (VALUE)
 
static VALUE rb_deflate_s_deflate (int, VALUE *, VALUE)
 
static void do_deflate (struct zstream *, VALUE, int)
 
static VALUE rb_deflate_deflate (int, VALUE *, VALUE)
 
static VALUE rb_deflate_addstr (VALUE, VALUE)
 
static VALUE rb_deflate_flush (int, VALUE *, VALUE)
 
static VALUE rb_deflate_params (VALUE, VALUE, VALUE)
 
static VALUE rb_deflate_set_dictionary (VALUE, VALUE)
 
static VALUE inflate_run (VALUE)
 
static VALUE rb_inflate_s_allocate (VALUE)
 
static VALUE rb_inflate_initialize (int, VALUE *, VALUE)
 
static VALUE rb_inflate_s_inflate (VALUE, VALUE)
 
static void do_inflate (struct zstream *, VALUE)
 
static VALUE rb_inflate_inflate (VALUE, VALUE)
 
static VALUE rb_inflate_addstr (VALUE, VALUE)
 
static VALUE rb_inflate_sync (VALUE, VALUE)
 
static VALUE rb_inflate_sync_point_p (VALUE)
 
static VALUE rb_inflate_set_dictionary (VALUE, VALUE)
 
static void gzfile_mark (void *)
 
static void gzfile_free (void *)
 
static VALUE gzfile_new (VALUE, const struct zstream_funcs *, void(*) _((struct gzfile *)))
 
static void gzfile_reset (struct gzfile *)
 
static void gzfile_close (struct gzfile *, int)
 
static void gzfile_write_raw (struct gzfile *)
 
static VALUE gzfile_read_raw_partial (VALUE)
 
static VALUE gzfile_read_raw_rescue (VALUE)
 
static VALUE gzfile_read_raw (struct gzfile *)
 
static int gzfile_read_raw_ensure (struct gzfile *, long)
 
static char * gzfile_read_raw_until_zero (struct gzfile *, long)
 
static unsigned int gzfile_get16 (const unsigned char *)
 
static unsigned long gzfile_get32 (const unsigned char *)
 
static void gzfile_set32 (unsigned long n, unsigned char *)
 
static void gzfile_make_header (struct gzfile *)
 
static void gzfile_make_footer (struct gzfile *)
 
static void gzfile_read_header (struct gzfile *)
 
static void gzfile_check_footer (struct gzfile *)
 
static void gzfile_write (struct gzfile *, Bytef *, long)
 
static long gzfile_read_more (struct gzfile *)
 
static void gzfile_calc_crc (struct gzfile *, VALUE)
 
static VALUE gzfile_read (struct gzfile *, long)
 
static VALUE gzfile_read_all (struct gzfile *)
 
static void gzfile_ungets (struct gzfile *, const Bytef *, long)
 
static void gzfile_ungetbyte (struct gzfile *, int)
 
static VALUE gzfile_writer_end_run (VALUE)
 
static void gzfile_writer_end (struct gzfile *)
 
static VALUE gzfile_reader_end_run (VALUE)
 
static void gzfile_reader_end (struct gzfile *)
 
static void gzfile_reader_rewind (struct gzfile *)
 
static VALUE gzfile_reader_get_unused (struct gzfile *)
 
static struct gzfileget_gzfile (VALUE)
 
static VALUE gzfile_ensure_close (VALUE)
 
static VALUE rb_gzfile_s_wrap (int, VALUE *, VALUE)
 
static VALUE gzfile_s_open (int, VALUE *, VALUE, const char *)
 
 NORETURN (static void gzfile_raise(struct gzfile *, VALUE, const char *))
 
static VALUE gzfile_error_inspect (VALUE)
 
static VALUE rb_gzfile_to_io (VALUE)
 
static VALUE rb_gzfile_crc (VALUE)
 
static VALUE rb_gzfile_mtime (VALUE)
 
static VALUE rb_gzfile_level (VALUE)
 
static VALUE rb_gzfile_os_code (VALUE)
 
static VALUE rb_gzfile_orig_name (VALUE)
 
static VALUE rb_gzfile_comment (VALUE)
 
static VALUE rb_gzfile_lineno (VALUE)
 
static VALUE rb_gzfile_set_lineno (VALUE, VALUE)
 
static VALUE rb_gzfile_set_mtime (VALUE, VALUE)
 
static VALUE rb_gzfile_set_orig_name (VALUE, VALUE)
 
static VALUE rb_gzfile_set_comment (VALUE, VALUE)
 
static VALUE rb_gzfile_close (VALUE)
 
static VALUE rb_gzfile_finish (VALUE)
 
static VALUE rb_gzfile_closed_p (VALUE)
 
static VALUE rb_gzfile_eof_p (VALUE)
 
static VALUE rb_gzfile_sync (VALUE)
 
static VALUE rb_gzfile_set_sync (VALUE, VALUE)
 
static VALUE rb_gzfile_total_in (VALUE)
 
static VALUE rb_gzfile_total_out (VALUE)
 
static VALUE rb_gzfile_path (VALUE)
 
static VALUE rb_gzwriter_s_allocate (VALUE)
 
static VALUE rb_gzwriter_s_open (int, VALUE *, VALUE)
 
static VALUE rb_gzwriter_initialize (int, VALUE *, VALUE)
 
static VALUE rb_gzwriter_flush (int, VALUE *, VALUE)
 
static VALUE rb_gzwriter_write (VALUE, VALUE)
 
static VALUE rb_gzwriter_putc (VALUE, VALUE)
 
static VALUE rb_gzreader_s_allocate (VALUE)
 
static VALUE rb_gzreader_s_open (int, VALUE *, VALUE)
 
static VALUE rb_gzreader_initialize (int, VALUE *, VALUE)
 
static VALUE rb_gzreader_rewind (VALUE)
 
static VALUE rb_gzreader_unused (VALUE)
 
static VALUE rb_gzreader_read (int, VALUE *, VALUE)
 
static VALUE rb_gzreader_getc (VALUE)
 
static VALUE rb_gzreader_readchar (VALUE)
 
static VALUE rb_gzreader_each_byte (VALUE)
 
static VALUE rb_gzreader_ungetc (VALUE, VALUE)
 
static VALUE rb_gzreader_ungetbyte (VALUE, VALUE)
 
static void gzreader_skip_linebreaks (struct gzfile *)
 
static VALUE gzreader_gets (int, VALUE *, VALUE)
 
static VALUE rb_gzreader_gets (int, VALUE *, VALUE)
 
static VALUE rb_gzreader_readline (int, VALUE *, VALUE)
 
static VALUE rb_gzreader_each (int, VALUE *, VALUE)
 
static VALUE rb_gzreader_readlines (int, VALUE *, VALUE)
 
void Init_zlib (void)
 
static void raise_zlib_error (int err, const char *msg)
 
static void * zstream_expand_buffer_protect (void *ptr)
 
static void * zstream_run_func (void *ptr)
 
static void zstream_unblock_func (void *ptr)
 
static size_t zstream_memsize (const void *p)
 
static VALUE rb_inflate_add_dictionary (VALUE obj, VALUE dictionary)
 
static size_t gzfile_memsize (const void *p)
 
static void gzfile_init (struct gzfile *gz, const struct zstream_funcs *funcs, void(*endfunc)(struct gzfile *))
 
static VALUE gzfile_new (VALUE klass, const struct zstream_funcs *funcs, void(*endfunc)(struct gzfile *))
 
static void gzfile_raise (struct gzfile *gz, VALUE klass, const char *message)
 
static VALUE gzfile_newstr (struct gzfile *gz, VALUE str)
 
static long gzfile_fill (struct gzfile *gz, long len)
 
static VALUE gzfile_readpartial (struct gzfile *gz, long len, VALUE outbuf)
 
static VALUE gzfile_getc (struct gzfile *gz)
 
static VALUE new_wrap (VALUE tmp)
 
static VALUE gzfile_wrap (int argc, VALUE *argv, VALUE klass, int close_io_on_error)
 
static void rb_gzfile_ecopts (struct gzfile *gz, VALUE opts)
 
static VALUE rb_gzreader_readpartial (int argc, VALUE *argv, VALUE obj)
 
static VALUE rb_gzreader_getbyte (VALUE obj)
 
static VALUE rb_gzreader_readbyte (VALUE obj)
 
static VALUE rb_gzreader_each_char (VALUE obj)
 
static VALUE rb_gzreader_bytes (VALUE obj)
 
static void rscheck (const char *rsptr, long rslen, VALUE rs)
 
static long gzreader_charboundary (struct gzfile *gz, long n)
 
static VALUE rb_gzreader_lines (int argc, VALUE *argv, VALUE obj)
 
static VALUE rb_gzreader_external_encoding (VALUE self)
 
static void zlib_gzip_end (struct gzfile *gz)
 
static VALUE zlib_s_gzip (int argc, VALUE *argv, VALUE klass)
 
static void zlib_gunzip_end (struct gzfile *gz)
 
static VALUE zlib_gunzip (VALUE klass, VALUE src)
 

Variables

static ID id_dictionaries
 
static VALUE cZError
 
static VALUE cStreamEnd
 
static VALUE cNeedDict
 
static VALUE cStreamError
 
static VALUE cDataError
 
static VALUE cMemError
 
static VALUE cBufError
 
static VALUE cVersionError
 
static const struct zstream_funcs deflate_funcs
 
static const struct zstream_funcs inflate_funcs
 
static const rb_data_type_t zstream_data_type
 
static ID id_write
 
static ID id_read
 
static ID id_readpartial
 
static ID id_flush
 
static ID id_seek
 
static ID id_close
 
static ID id_path
 
static ID id_input
 
static VALUE cGzError
 
static VALUE cNoFooter
 
static VALUE cCRCError
 
static VALUE cLengthError
 
static const rb_data_type_t gzfile_data_type
 
static ID id_level
 
static ID id_strategy
 

Macro Definition Documentation

◆ ARG_FLUSH

#define ARG_FLUSH (   val)    FIXNUMARG((val), Z_NO_FLUSH)

Definition at line 1425 of file zlib.c.

Referenced by rb_deflate_deflate().

◆ ARG_LEVEL

#define ARG_LEVEL (   val)    FIXNUMARG((val), Z_DEFAULT_COMPRESSION)

◆ ARG_MEMLEVEL

#define ARG_MEMLEVEL (   val)    FIXNUMARG((val), DEF_MEM_LEVEL)

Definition at line 1423 of file zlib.c.

Referenced by rb_deflate_initialize().

◆ ARG_STRATEGY

#define ARG_STRATEGY (   val)    FIXNUMARG((val), Z_DEFAULT_STRATEGY)

◆ ARG_WBITS

#define ARG_WBITS (   val)    FIXNUMARG((val), MAX_WBITS)

Definition at line 1422 of file zlib.c.

Referenced by rb_deflate_initialize(), and rb_inflate_initialize().

◆ checksum_long

#define checksum_long (   func,
  sum,
  ptr,
  len 
)    (func)((sum), (ptr), (len))

Definition at line 385 of file zlib.c.

Referenced by do_checksum(), gzfile_calc_crc(), gzfile_write(), rb_zlib_version(), and zlib_s_gzip().

◆ DEF_MEM_LEVEL

#define DEF_MEM_LEVEL   MAX_MEM_LEVEL

Definition at line 39 of file zlib.c.

Referenced by Init_zlib(), rb_gzwriter_initialize(), and zlib_s_gzip().

◆ FIXNUMARG

#define FIXNUMARG (   val,
  ifnil 
)
Value:
(NIL_P((val)) ? (ifnil) \
: (FIX2INT((val))))
#define val
#define NIL_P(v)
Definition: ruby.h:451
#define FIX2INT(x)
Definition: ruby.h:686

Definition at line 1417 of file zlib.c.

Referenced by rb_deflate_flush(), and rb_gzwriter_flush().

◆ GZ_EXTRAFLAG_FAST

#define GZ_EXTRAFLAG_FAST   0x4

Definition at line 2145 of file zlib.c.

Referenced by gzfile_make_header(), and gzfile_read_header().

◆ GZ_EXTRAFLAG_SLOW

#define GZ_EXTRAFLAG_SLOW   0x2

Definition at line 2146 of file zlib.c.

Referenced by gzfile_make_header(), and gzfile_read_header().

◆ GZ_FLAG_COMMENT

#define GZ_FLAG_COMMENT   0x10

Definition at line 2141 of file zlib.c.

Referenced by gzfile_make_header(), and gzfile_read_header().

◆ GZ_FLAG_ENCRYPT

#define GZ_FLAG_ENCRYPT   0x20

Definition at line 2142 of file zlib.c.

Referenced by gzfile_read_header().

◆ GZ_FLAG_EXTRA

#define GZ_FLAG_EXTRA   0x4

Definition at line 2139 of file zlib.c.

Referenced by gzfile_read_header().

◆ GZ_FLAG_MULTIPART

#define GZ_FLAG_MULTIPART   0x2

Definition at line 2138 of file zlib.c.

Referenced by gzfile_read_header().

◆ GZ_FLAG_ORIG_NAME

#define GZ_FLAG_ORIG_NAME   0x8

Definition at line 2140 of file zlib.c.

Referenced by gzfile_make_header(), and gzfile_read_header().

◆ GZ_FLAG_UNKNOWN_MASK

#define GZ_FLAG_UNKNOWN_MASK   0xc0

Definition at line 2143 of file zlib.c.

Referenced by gzfile_read_header().

◆ GZ_MAGIC1

#define GZ_MAGIC1   0x1f

Definition at line 2135 of file zlib.c.

Referenced by gzfile_make_header(), and gzfile_read_header().

◆ GZ_MAGIC2

#define GZ_MAGIC2   0x8b

Definition at line 2136 of file zlib.c.

Referenced by gzfile_make_header(), and gzfile_read_header().

◆ GZ_METHOD_DEFLATE

#define GZ_METHOD_DEFLATE   8

Definition at line 2137 of file zlib.c.

Referenced by gzfile_make_header(), and gzfile_read_header().

◆ GZFILE_CBUF_CAPA

#define GZFILE_CBUF_CAPA   10

Definition at line 2197 of file zlib.c.

Referenced by gzfile_getc(), and gzfile_memsize().

◆ GZFILE_FLAG_FOOTER_FINISHED

#define GZFILE_FLAG_FOOTER_FINISHED   (ZSTREAM_FLAG_UNUSED << 2)

◆ GZFILE_FLAG_HEADER_FINISHED

#define GZFILE_FLAG_HEADER_FINISHED   (ZSTREAM_FLAG_UNUSED << 1)

◆ GZFILE_FLAG_SYNC

#define GZFILE_FLAG_SYNC   ZSTREAM_FLAG_UNUSED

Definition at line 2199 of file zlib.c.

Referenced by gzfile_write(), gzfile_write_raw(), rb_gzfile_set_sync(), and rb_gzfile_sync().

◆ GZFILE_IS_FINISHED

#define GZFILE_IS_FINISHED (   gz)    (ZSTREAM_IS_FINISHED(&(gz)->z) && ZSTREAM_BUF_FILLED(&(gz)->z) == 0)

◆ GZFILE_READ_SIZE

#define GZFILE_READ_SIZE   2048

Definition at line 2206 of file zlib.c.

Referenced by gzfile_read_raw_partial(), and gzfile_read_raw_rescue().

◆ gzfile_reader_new

#define gzfile_reader_new (   gz)    gzfile_new((gz),&inflate_funcs,gzfile_reader_end)

Definition at line 2294 of file zlib.c.

Referenced by rb_gzreader_s_allocate().

◆ gzfile_writer_new

#define gzfile_writer_new (   gz)    gzfile_new((gz),&deflate_funcs,gzfile_writer_end)

Definition at line 2293 of file zlib.c.

Referenced by rb_gzwriter_s_allocate().

◆ GZIP_SUPPORT

#define GZIP_SUPPORT   1

Definition at line 31 of file zlib.c.

◆ MAX_UINT

#define MAX_UINT (   n)    (uInt)(n)

Definition at line 52 of file zlib.c.

Referenced by zstream_expand_buffer_into(), zstream_run(), and zstream_sync().

◆ OPTHASH_GIVEN_P

#define OPTHASH_GIVEN_P (   opts)    (argc > 0 && !NIL_P((opts) = rb_check_hash_type(argv[argc-1])) && (--argc, 1))

Definition at line 4257 of file zlib.c.

Referenced by zlib_s_gzip().

◆ OS_AMIGA

#define OS_AMIGA   0x01

Definition at line 2150 of file zlib.c.

Referenced by Init_zlib().

◆ OS_ATARI

#define OS_ATARI   0x05

Definition at line 2153 of file zlib.c.

Referenced by Init_zlib().

◆ OS_CODE

#define OS_CODE   OS_UNIX

Definition at line 2167 of file zlib.c.

Referenced by gzfile_init(), and Init_zlib().

◆ OS_CPM

#define OS_CPM   0x09

Definition at line 2161 of file zlib.c.

Referenced by Init_zlib().

◆ OS_MACOS

#define OS_MACOS   0x07

Definition at line 2155 of file zlib.c.

Referenced by Init_zlib().

◆ OS_MSDOS

#define OS_MSDOS   0x00

Definition at line 2149 of file zlib.c.

Referenced by Init_zlib().

◆ OS_OS2

#define OS_OS2   0x06

Definition at line 2154 of file zlib.c.

Referenced by Init_zlib().

◆ OS_QDOS

#define OS_QDOS   0x0c

Definition at line 2162 of file zlib.c.

Referenced by Init_zlib().

◆ OS_RISCOS

#define OS_RISCOS   0x0d

Definition at line 2163 of file zlib.c.

Referenced by Init_zlib().

◆ OS_TOPS20

#define OS_TOPS20   0x0a

Definition at line 2156 of file zlib.c.

Referenced by Init_zlib().

◆ OS_UNIX

#define OS_UNIX   0x03

Definition at line 2152 of file zlib.c.

Referenced by Init_zlib().

◆ OS_UNKNOWN

#define OS_UNKNOWN   0xff

Definition at line 2164 of file zlib.c.

Referenced by Init_zlib().

◆ OS_VMCMS

#define OS_VMCMS   0x04

Definition at line 2159 of file zlib.c.

Referenced by Init_zlib().

◆ OS_VMS

#define OS_VMS   0x02

Definition at line 2151 of file zlib.c.

Referenced by Init_zlib().

◆ OS_WIN32

#define OS_WIN32   0x0b

Definition at line 2157 of file zlib.c.

Referenced by Init_zlib().

◆ OS_ZSYSTEM

#define OS_ZSYSTEM   0x08

Definition at line 2160 of file zlib.c.

Referenced by Init_zlib().

◆ rb_gzwriter_addstr

#define rb_gzwriter_addstr   rb_io_addstr

Definition at line 3602 of file zlib.c.

Referenced by Init_zlib().

◆ rb_gzwriter_print

#define rb_gzwriter_print   rb_io_print

Definition at line 3612 of file zlib.c.

Referenced by Init_zlib().

◆ rb_gzwriter_printf

#define rb_gzwriter_printf   rb_io_printf

Definition at line 3607 of file zlib.c.

Referenced by Init_zlib().

◆ rb_gzwriter_puts

#define rb_gzwriter_puts   rb_io_puts

Definition at line 3617 of file zlib.c.

Referenced by Init_zlib().

◆ rb_zlib_adler32_combine

#define rb_zlib_adler32_combine   rb_f_notimplement

Definition at line 458 of file zlib.c.

Referenced by Init_zlib(), and rb_zlib_adler32().

◆ rb_zlib_crc32_combine

#define rb_zlib_crc32_combine   rb_f_notimplement

Definition at line 496 of file zlib.c.

Referenced by Init_zlib(), and rb_zlib_crc32().

◆ RUBY_ZLIB_VERSION

#define RUBY_ZLIB_VERSION   "0.6.0"

Definition at line 28 of file zlib.c.

Referenced by Init_zlib().

◆ VALGRIND_MAKE_MEM_DEFINED

#define VALGRIND_MAKE_MEM_DEFINED (   p,
 
)    0

Definition at line 24 of file zlib.c.

Referenced by gc_mark_maybe(), and zlib_mem_alloc().

◆ VALGRIND_MAKE_MEM_UNDEFINED

#define VALGRIND_MAKE_MEM_UNDEFINED (   p,
 
)    0

Definition at line 25 of file zlib.c.

Referenced by bignew_1(), gc_page_sweep(), and rb_big_realloc().

◆ zstream_append_buffer2

#define zstream_append_buffer2 (   z,
 
)    zstream_append_buffer((z),(Bytef*)RSTRING_PTR(v),RSTRING_LEN(v))

◆ zstream_append_input2

#define zstream_append_input2 (   z,
 
)
Value:
zstream_append_input((z), (Bytef*)RSTRING_PTR(v), RSTRING_LEN(v))
#define RB_GC_GUARD(v)
Definition: ruby.h:552
#define RSTRING_LEN(str)
Definition: ruby.h:978
#define RSTRING_PTR(str)
Definition: ruby.h:982

Definition at line 841 of file zlib.c.

Referenced by gzfile_read_raw_ensure(), and gzfile_read_raw_until_zero().

◆ ZSTREAM_AVAIL_OUT_STEP_MAX

#define ZSTREAM_AVAIL_OUT_STEP_MAX   16384

◆ ZSTREAM_AVAIL_OUT_STEP_MIN

#define ZSTREAM_AVAIL_OUT_STEP_MIN   2048

Definition at line 562 of file zlib.c.

Referenced by zstream_expand_buffer_non_stream().

◆ ZSTREAM_BUF_FILLED

#define ZSTREAM_BUF_FILLED (   z)    (NIL_P((z)->buf) ? 0 : RSTRING_LEN((z)->buf))

◆ zstream_deflate_new

#define zstream_deflate_new (   klass)    zstream_new((klass), &deflate_funcs)

Definition at line 1155 of file zlib.c.

Referenced by rb_deflate_s_allocate().

◆ ZSTREAM_EXPAND_BUFFER_OK

#define ZSTREAM_EXPAND_BUFFER_OK   0

Definition at line 555 of file zlib.c.

Referenced by zstream_expand_buffer_non_stream().

◆ ZSTREAM_FLAG_CLOSING

#define ZSTREAM_FLAG_CLOSING   0x8

Definition at line 543 of file zlib.c.

Referenced by gzfile_reader_end(), gzfile_writer_end(), zlib_gunzip_end(), and zlib_gzip_end().

◆ ZSTREAM_FLAG_FINISHED

#define ZSTREAM_FLAG_FINISHED   0x4

Definition at line 542 of file zlib.c.

Referenced by zstream_run_func().

◆ ZSTREAM_FLAG_GZFILE

#define ZSTREAM_FLAG_GZFILE
Value:
0x10 /* disallows yield from expand_buffer for
gzip*/

Definition at line 544 of file zlib.c.

Referenced by gzfile_init(), and gzfile_reset().

◆ ZSTREAM_FLAG_IN_STREAM

#define ZSTREAM_FLAG_IN_STREAM   0x2

Definition at line 541 of file zlib.c.

Referenced by zstream_end(), zstream_run(), and zstream_run_func().

◆ ZSTREAM_FLAG_READY

#define ZSTREAM_FLAG_READY   0x1

Definition at line 540 of file zlib.c.

Referenced by zstream_reset().

◆ ZSTREAM_FLAG_UNUSED

#define ZSTREAM_FLAG_UNUSED   0x20

Definition at line 546 of file zlib.c.

◆ zstream_inflate_new

#define zstream_inflate_new (   klass)    zstream_new((klass), &inflate_funcs)

Definition at line 1156 of file zlib.c.

Referenced by rb_inflate_s_allocate().

◆ zstream_init_deflate

#define zstream_init_deflate (   z)    zstream_init((z), &deflate_funcs)

Definition at line 615 of file zlib.c.

Referenced by rb_deflate_s_deflate().

◆ zstream_init_inflate

#define zstream_init_inflate (   z)    zstream_init((z), &inflate_funcs)

Definition at line 616 of file zlib.c.

Referenced by rb_inflate_s_inflate().

◆ ZSTREAM_INITIAL_BUFSIZE

#define ZSTREAM_INITIAL_BUFSIZE   1024

Definition at line 559 of file zlib.c.

Referenced by zstream_expand_buffer().

◆ ZSTREAM_IS_CLOSING

#define ZSTREAM_IS_CLOSING (   z)    ((z)->flags & ZSTREAM_FLAG_CLOSING)

Definition at line 551 of file zlib.c.

Referenced by gzfile_reader_end(), and gzfile_writer_end().

◆ ZSTREAM_IS_FINISHED

#define ZSTREAM_IS_FINISHED (   z)    ((z)->flags & ZSTREAM_FLAG_FINISHED)

◆ ZSTREAM_IS_GZFILE

#define ZSTREAM_IS_GZFILE (   z)    ((z)->flags & ZSTREAM_FLAG_GZFILE)

Definition at line 552 of file zlib.c.

Referenced by zstream_detach_buffer(), zstream_expand_buffer(), and zstream_run().

◆ ZSTREAM_IS_READY

#define ZSTREAM_IS_READY (   z)    ((z)->flags & ZSTREAM_FLAG_READY)

◆ ZSTREAM_READY

#define ZSTREAM_READY (   z)    ((z)->flags |= ZSTREAM_FLAG_READY)

Function Documentation

◆ deflate_run()

static VALUE deflate_run ( VALUE  args)
static

Definition at line 1555 of file zlib.c.

References RSTRING_LEN, RSTRING_PTR, zstream_detach_buffer(), and zstream_run().

Referenced by rb_deflate_s_deflate().

◆ do_checksum()

static VALUE do_checksum ( int  argc,
VALUE argv,
uLong(*)(uLong, const Bytef *, uInt)  func 
)
static

◆ do_deflate()

static void do_deflate ( struct zstream z,
VALUE  src,
int  flush 
)
static

Definition at line 1614 of file zlib.c.

References NIL_P, RSTRING_LEN, RSTRING_PTR, StringValue, and zstream_run().

Referenced by rb_deflate_addstr(), and rb_deflate_deflate().

◆ do_inflate()

static void do_inflate ( struct zstream z,
VALUE  src 
)
static

Definition at line 1929 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().

◆ finalizer_warn()

static void finalizer_warn ( const char *  msg)
static

Definition at line 347 of file zlib.c.

Referenced by gzfile_free(), and zstream_finalize().

◆ get_gzfile()

static struct gzfile * get_gzfile ( VALUE  obj)
static

◆ get_zstream()

static struct zstream * get_zstream ( VALUE  obj)
static

◆ gzfile_calc_crc()

static void gzfile_calc_crc ( struct gzfile gz,
VALUE  str 
)
static

◆ gzfile_check_footer()

static void gzfile_check_footer ( struct gzfile gz)
static

◆ gzfile_close()

static void gzfile_close ( struct gzfile gz,
int  closeflag 
)
static

◆ gzfile_ensure_close()

static VALUE gzfile_ensure_close ( VALUE  obj)
static

Definition at line 3002 of file zlib.c.

References gzfile_close(), Qnil, TypedData_Get_Struct, gzfile::z, and ZSTREAM_IS_READY.

Referenced by gzfile_wrap().

◆ gzfile_error_inspect()

static VALUE gzfile_error_inspect ( VALUE  error)
static

◆ gzfile_fill()

static long gzfile_fill ( struct gzfile gz,
long  len 
)
static

◆ gzfile_free()

static void gzfile_free ( void *  p)
static

◆ gzfile_get16()

static unsigned int gzfile_get16 ( const unsigned char *  src)
static

Definition at line 2411 of file zlib.c.

Referenced by gzfile_read_header().

◆ gzfile_get32()

static unsigned long gzfile_get32 ( const unsigned char *  src)
static

Definition at line 2420 of file zlib.c.

Referenced by gzfile_check_footer(), and gzfile_read_header().

◆ gzfile_getc()

static VALUE gzfile_getc ( struct gzfile gz)
static

◆ gzfile_init()

static void gzfile_init ( struct gzfile gz,
const struct zstream_funcs *  funcs,
void(*)(struct gzfile *)  endfunc 
)
static

◆ gzfile_make_footer()

static void gzfile_make_footer ( struct gzfile gz)
static

◆ gzfile_make_header()

static void gzfile_make_header ( struct gzfile gz)
static

◆ gzfile_mark()

static void gzfile_mark ( void *  p)
static

◆ gzfile_memsize()

static size_t gzfile_memsize ( const void *  p)
static

Definition at line 2241 of file zlib.c.

References gzfile::cbuf, GZFILE_CBUF_CAPA, and size.

◆ gzfile_new() [1/2]

static VALUE gzfile_new ( VALUE  ,
const struct zstream_funcs *  ,
void(*) _((struct gzfile *))   
)
static

◆ gzfile_new() [2/2]

static VALUE gzfile_new ( VALUE  klass,
const struct zstream_funcs *  funcs,
void(*)(struct gzfile *)  endfunc 
)
static

Definition at line 2283 of file zlib.c.

References gzfile_init(), and TypedData_Make_Struct.

◆ gzfile_newstr()

static VALUE gzfile_newstr ( struct gzfile gz,
VALUE  str 
)
static

◆ gzfile_raise()

static void gzfile_raise ( struct gzfile gz,
VALUE  klass,
const char *  message 
)
static

◆ gzfile_read()

static VALUE gzfile_read ( struct gzfile gz,
long  len 
)
static

◆ gzfile_read_all()

static VALUE gzfile_read_all ( struct gzfile gz)
static

◆ gzfile_read_header()

static void gzfile_read_header ( struct gzfile gz)
static

◆ gzfile_read_more()

static long gzfile_read_more ( struct gzfile gz)
static

◆ gzfile_read_raw()

static VALUE gzfile_read_raw ( struct gzfile gz)
static

◆ gzfile_read_raw_ensure()

static int gzfile_read_raw_ensure ( struct gzfile gz,
long  size 
)
static

◆ gzfile_read_raw_partial()

static VALUE gzfile_read_raw_partial ( VALUE  arg)
static

Definition at line 2341 of file zlib.c.

References Check_Type, GZFILE_READ_SIZE, INT2FIX, gzfile::io, rb_funcall(), and T_STRING.

Referenced by gzfile_read_raw().

◆ gzfile_read_raw_rescue()

static VALUE gzfile_read_raw_rescue ( VALUE  arg)
static

◆ gzfile_read_raw_until_zero()

static char * gzfile_read_raw_until_zero ( struct gzfile gz,
long  offset 
)
static

◆ gzfile_reader_end()

static void gzfile_reader_end ( struct gzfile gz)
static

◆ gzfile_reader_end_run()

static VALUE gzfile_reader_end_run ( VALUE  arg)
static

◆ gzfile_reader_get_unused()

static VALUE gzfile_reader_get_unused ( struct gzfile gz)
static

◆ gzfile_reader_rewind()

static void gzfile_reader_rewind ( struct gzfile gz)
static

◆ gzfile_readpartial()

static VALUE gzfile_readpartial ( struct gzfile gz,
long  len,
VALUE  outbuf 
)
static

◆ gzfile_reset()

static void gzfile_reset ( struct gzfile gz)
static

◆ gzfile_s_open()

static VALUE gzfile_s_open ( int  argc,
VALUE argv,
VALUE  klass,
const char *  mode 
)
static

◆ gzfile_set32()

static void gzfile_set32 ( unsigned long  n,
unsigned char *  dst 
)
static

Definition at line 2431 of file zlib.c.

Referenced by gzfile_make_footer(), and gzfile_make_header().

◆ gzfile_ungetbyte()

static void gzfile_ungetbyte ( struct gzfile gz,
int  c 
)
static

Definition at line 2851 of file zlib.c.

References gzfile::ungetc, gzfile::z, and zstream_buffer_ungetbyte().

Referenced by rb_gzreader_ungetbyte().

◆ gzfile_ungets()

static void gzfile_ungets ( struct gzfile gz,
const Bytef *  b,
long  len 
)
static

Definition at line 2844 of file zlib.c.

References len, gzfile::ungetc, gzfile::z, and zstream_buffer_ungets().

Referenced by rb_gzreader_ungetc().

◆ gzfile_wrap()

static VALUE gzfile_wrap ( int  argc,
VALUE argv,
VALUE  klass,
int  close_io_on_error 
)
static

◆ gzfile_write()

static void gzfile_write ( struct gzfile gz,
Bytef *  str,
long  len 
)
static

◆ gzfile_write_raw()

static void gzfile_write_raw ( struct gzfile gz)
static

◆ gzfile_writer_end()

static void gzfile_writer_end ( struct gzfile gz)
static

◆ gzfile_writer_end_run()

static VALUE gzfile_writer_end_run ( VALUE  arg)
static

◆ gzreader_charboundary()

static long gzreader_charboundary ( struct gzfile gz,
long  n 
)
static

◆ gzreader_gets()

static VALUE gzreader_gets ( int  argc,
VALUE argv,
VALUE  obj 
)
static

◆ gzreader_skip_linebreaks()

static void gzreader_skip_linebreaks ( struct gzfile gz)
static

◆ inflate_run()

static VALUE inflate_run ( VALUE  args)
static

Definition at line 1872 of file zlib.c.

References RSTRING_LEN, RSTRING_PTR, zstream_detach_buffer(), and zstream_run().

Referenced by rb_inflate_s_inflate().

◆ Init_zlib()

void Init_zlib ( void  )

Definition at line 4385 of file zlib.c.

References DEF_MEM_LEVEL, gzfile_error_inspect(), id_dictionaries, 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_bytes(), rb_gzreader_each(), rb_gzreader_each_byte(), rb_gzreader_each_char(), rb_gzreader_external_encoding(), rb_gzreader_getbyte(), rb_gzreader_getc(), rb_gzreader_gets(), rb_gzreader_initialize(), rb_gzreader_lines(), 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_add_dictionary(), 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(), RUBY_ZLIB_VERSION, zlib_gunzip(), and zlib_s_gzip().

◆ new_wrap()

static VALUE new_wrap ( VALUE  tmp)
static

◆ NORETURN() [1/2]

static NORETURN ( void   raise_zlib_errorint, const char *)
static

◆ NORETURN() [2/2]

NORETURN ( static void   gzfile_raisestruct gzfile *, VALUE, const char *)

◆ raise_zlib_error()

static void raise_zlib_error ( int  err,
const char *  msg 
)
static

◆ rb_deflate_addstr()

static VALUE rb_deflate_addstr ( VALUE  obj,
VALUE  src 
)
static

Definition at line 1675 of file zlib.c.

References do_deflate(), get_zstream(), and OBJ_INFECT.

Referenced by Init_zlib().

◆ rb_deflate_deflate()

static VALUE rb_deflate_deflate ( int  argc,
VALUE argv,
VALUE  obj 
)
static

Definition at line 1653 of file zlib.c.

References ARG_FLUSH, do_deflate(), get_zstream(), OBJ_INFECT, rb_scan_args(), and zstream_detach_buffer().

Referenced by Init_zlib().

◆ rb_deflate_flush()

static VALUE rb_deflate_flush ( int  argc,
VALUE argv,
VALUE  obj 
)
static

Definition at line 1698 of file zlib.c.

References FIXNUMARG, get_zstream(), rb_scan_args(), zstream_detach_buffer(), and zstream_run().

Referenced by Init_zlib().

◆ rb_deflate_init_copy()

static VALUE rb_deflate_init_copy ( VALUE  self,
VALUE  orig 
)
static

◆ rb_deflate_initialize()

static VALUE rb_deflate_initialize ( int  argc,
VALUE argv,
VALUE  obj 
)
static

◆ rb_deflate_params()

static VALUE rb_deflate_params ( VALUE  obj,
VALUE  v_level,
VALUE  v_strategy 
)
static

◆ rb_deflate_s_allocate()

static VALUE rb_deflate_s_allocate ( VALUE  klass)
static

Definition at line 1429 of file zlib.c.

References zstream_deflate_new.

Referenced by Init_zlib().

◆ rb_deflate_s_deflate()

static VALUE rb_deflate_s_deflate ( int  argc,
VALUE argv,
VALUE  klass 
)
static

◆ rb_deflate_set_dictionary()

static VALUE rb_deflate_set_dictionary ( VALUE  obj,
VALUE  dic 
)
static

Definition at line 1771 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().

◆ rb_gzfile_close()

static VALUE rb_gzfile_close ( VALUE  obj)
static

Definition at line 3283 of file zlib.c.

References gzfile_close(), gzfile::io, Qnil, TypedData_Get_Struct, gzfile::z, and ZSTREAM_IS_READY.

Referenced by Init_zlib().

◆ rb_gzfile_closed_p()

static VALUE rb_gzfile_closed_p ( VALUE  obj)
static

Definition at line 3322 of file zlib.c.

References gzfile::io, NIL_P, Qfalse, Qtrue, and TypedData_Get_Struct.

Referenced by Init_zlib().

◆ rb_gzfile_comment()

static VALUE rb_gzfile_comment ( VALUE  obj)
static

Definition at line 3159 of file zlib.c.

References gzfile::comment, get_gzfile(), NIL_P, OBJ_TAINT, and rb_str_dup().

Referenced by Init_zlib().

◆ rb_gzfile_crc()

static VALUE rb_gzfile_crc ( VALUE  obj)
static

Definition at line 3097 of file zlib.c.

References gzfile::crc, get_gzfile(), and rb_uint2inum().

Referenced by Init_zlib().

◆ rb_gzfile_ecopts()

static void rb_gzfile_ecopts ( struct gzfile gz,
VALUE  opts 
)
static

◆ rb_gzfile_eof_p()

static VALUE rb_gzfile_eof_p ( VALUE  obj)
static

Definition at line 3335 of file zlib.c.

References get_gzfile(), GZFILE_IS_FINISHED, Qfalse, and Qtrue.

Referenced by Init_zlib().

◆ rb_gzfile_finish()

static VALUE rb_gzfile_finish ( VALUE  obj)
static

Definition at line 3305 of file zlib.c.

References get_gzfile(), gzfile_close(), and gzfile::io.

Referenced by Init_zlib().

◆ rb_gzfile_level()

static VALUE rb_gzfile_level ( VALUE  obj)
static

Definition at line 3119 of file zlib.c.

References get_gzfile(), INT2FIX, and level.

Referenced by Init_zlib().

◆ rb_gzfile_lineno()

static VALUE rb_gzfile_lineno ( VALUE  obj)
static

Definition at line 3175 of file zlib.c.

References get_gzfile(), INT2NUM, and gzfile::lineno.

Referenced by Init_zlib().

◆ rb_gzfile_mtime()

static VALUE rb_gzfile_mtime ( VALUE  obj)
static

Definition at line 3108 of file zlib.c.

References get_gzfile(), gzfile::mtime, and rb_time_new().

Referenced by Init_zlib().

◆ rb_gzfile_orig_name()

static VALUE rb_gzfile_orig_name ( VALUE  obj)
static

Definition at line 3142 of file zlib.c.

References get_gzfile(), NIL_P, OBJ_TAINT, gzfile::orig_name, and rb_str_dup().

Referenced by Init_zlib().

◆ rb_gzfile_os_code()

static VALUE rb_gzfile_os_code ( VALUE  obj)
static

Definition at line 3130 of file zlib.c.

References get_gzfile(), INT2FIX, and gzfile::os_code.

Referenced by Init_zlib().

◆ rb_gzfile_path()

static VALUE rb_gzfile_path ( VALUE  obj)
static

Definition at line 3415 of file zlib.c.

References gzfile::path, and TypedData_Get_Struct.

Referenced by rb_gzreader_initialize(), and rb_gzwriter_initialize().

◆ rb_gzfile_s_wrap()

static VALUE rb_gzfile_s_wrap ( int  argc,
VALUE argv,
VALUE  klass 
)
static

Definition at line 3058 of file zlib.c.

References gzfile_wrap().

Referenced by Init_zlib().

◆ rb_gzfile_set_comment()

static VALUE rb_gzfile_set_comment ( VALUE  obj,
VALUE  str 
)
static

◆ rb_gzfile_set_lineno()

static VALUE rb_gzfile_set_lineno ( VALUE  obj,
VALUE  lineno 
)
static

Definition at line 3186 of file zlib.c.

References get_gzfile(), gzfile::lineno, and NUM2INT.

Referenced by Init_zlib().

◆ rb_gzfile_set_mtime()

static VALUE rb_gzfile_set_mtime ( VALUE  obj,
VALUE  mtime 
)
static

◆ rb_gzfile_set_orig_name()

static VALUE rb_gzfile_set_orig_name ( VALUE  obj,
VALUE  str 
)
static

◆ rb_gzfile_set_sync()

static VALUE rb_gzfile_set_sync ( VALUE  obj,
VALUE  mode 
)
static

Definition at line 3363 of file zlib.c.

References zstream::flags, get_gzfile(), GZFILE_FLAG_SYNC, RTEST, and gzfile::z.

Referenced by Init_zlib().

◆ rb_gzfile_sync()

static VALUE rb_gzfile_sync ( VALUE  obj)
static

Definition at line 3348 of file zlib.c.

References zstream::flags, get_gzfile(), GZFILE_FLAG_SYNC, Qfalse, Qtrue, and gzfile::z.

Referenced by Init_zlib().

◆ rb_gzfile_to_io()

static VALUE rb_gzfile_to_io ( VALUE  obj)
static

Definition at line 3086 of file zlib.c.

References get_gzfile(), and gzfile::io.

Referenced by Init_zlib().

◆ rb_gzfile_total_in()

static VALUE rb_gzfile_total_in ( VALUE  obj)
static

Definition at line 3382 of file zlib.c.

References get_gzfile(), rb_uint2inum(), zstream::stream, and gzfile::z.

Referenced by Init_zlib().

◆ rb_gzfile_total_out()

static VALUE rb_gzfile_total_out ( VALUE  obj)
static

Definition at line 3393 of file zlib.c.

References get_gzfile(), LONG2FIX, rb_uint2inum(), zstream::stream, gzfile::z, and ZSTREAM_BUF_FILLED.

Referenced by Init_zlib().

◆ rb_gzreader_bytes()

static VALUE rb_gzreader_bytes ( VALUE  obj)
static

Definition at line 3927 of file zlib.c.

References ID2SYM, rb_block_given_p(), rb_enumeratorize(), rb_gzreader_each_byte(), rb_intern, and rb_warn().

Referenced by Init_zlib().

◆ rb_gzreader_each()

static VALUE rb_gzreader_each ( int  argc,
VALUE argv,
VALUE  obj 
)
static

Definition at line 4195 of file zlib.c.

References gzreader_gets(), NIL_P, rb_yield(), and RETURN_ENUMERATOR.

Referenced by Init_zlib(), and rb_gzreader_lines().

◆ rb_gzreader_each_byte()

static VALUE rb_gzreader_each_byte ( VALUE  obj)
static

Definition at line 3909 of file zlib.c.

References NIL_P, Qnil, rb_gzreader_getbyte(), rb_yield(), and RETURN_ENUMERATOR.

Referenced by Init_zlib(), and rb_gzreader_bytes().

◆ rb_gzreader_each_char()

static VALUE rb_gzreader_each_char ( VALUE  obj)
static

Definition at line 3891 of file zlib.c.

References NIL_P, Qnil, rb_gzreader_getc(), rb_yield(), and RETURN_ENUMERATOR.

Referenced by Init_zlib().

◆ rb_gzreader_external_encoding()

static VALUE rb_gzreader_external_encoding ( VALUE  self)
static

Definition at line 4243 of file zlib.c.

References gzfile::enc, get_gzfile(), and rb_enc_from_encoding().

Referenced by Init_zlib().

◆ rb_gzreader_getbyte()

static VALUE rb_gzreader_getbyte ( VALUE  obj)
static

Definition at line 3857 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().

◆ rb_gzreader_getc()

static VALUE rb_gzreader_getc ( VALUE  obj)
static

Definition at line 3828 of file zlib.c.

References get_gzfile(), and gzfile_getc().

Referenced by Init_zlib(), rb_gzreader_each_char(), and rb_gzreader_readchar().

◆ rb_gzreader_gets()

static VALUE rb_gzreader_gets ( int  argc,
VALUE argv,
VALUE  obj 
)
static

Definition at line 4163 of file zlib.c.

References gzreader_gets(), NIL_P, and rb_lastline_set().

Referenced by Init_zlib(), and rb_gzreader_readline().

◆ rb_gzreader_initialize()

static VALUE rb_gzreader_initialize ( int  argc,
VALUE argv,
VALUE  obj 
)
static

◆ rb_gzreader_lines()

static VALUE rb_gzreader_lines ( int  argc,
VALUE argv,
VALUE  obj 
)
static

Definition at line 4213 of file zlib.c.

References ID2SYM, rb_block_given_p(), rb_enumeratorize(), rb_gzreader_each(), rb_intern, and rb_warn().

Referenced by Init_zlib().

◆ rb_gzreader_read()

static VALUE rb_gzreader_read ( int  argc,
VALUE argv,
VALUE  obj 
)
static

Definition at line 3774 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().

◆ rb_gzreader_readbyte()

static VALUE rb_gzreader_readbyte ( VALUE  obj)
static

Definition at line 3875 of file zlib.c.

References NIL_P, rb_eEOFError, rb_gzreader_getbyte(), and rb_raise().

Referenced by Init_zlib().

◆ rb_gzreader_readchar()

static VALUE rb_gzreader_readchar ( VALUE  obj)
static

Definition at line 3841 of file zlib.c.

References NIL_P, rb_eEOFError, rb_gzreader_getc(), and rb_raise().

Referenced by Init_zlib().

◆ rb_gzreader_readline()

static VALUE rb_gzreader_readline ( int  argc,
VALUE argv,
VALUE  obj 
)
static

Definition at line 4179 of file zlib.c.

References NIL_P, rb_eEOFError, rb_gzreader_gets(), and rb_raise().

Referenced by Init_zlib().

◆ rb_gzreader_readlines()

static VALUE rb_gzreader_readlines ( int  argc,
VALUE argv,
VALUE  obj 
)
static

Definition at line 4227 of file zlib.c.

References gzreader_gets(), NIL_P, rb_ary_new(), and rb_ary_push().

Referenced by Init_zlib().

◆ rb_gzreader_readpartial()

static VALUE rb_gzreader_readpartial ( int  argc,
VALUE argv,
VALUE  obj 
)
static

Definition at line 3805 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().

◆ rb_gzreader_rewind()

static VALUE rb_gzreader_rewind ( VALUE  obj)
static

Definition at line 3747 of file zlib.c.

References get_gzfile(), gzfile_reader_rewind(), and INT2FIX.

Referenced by Init_zlib().

◆ rb_gzreader_s_allocate()

static VALUE rb_gzreader_s_allocate ( VALUE  klass)
static

Definition at line 3675 of file zlib.c.

References gzfile_reader_new.

Referenced by Init_zlib().

◆ rb_gzreader_s_open()

static VALUE rb_gzreader_s_open ( int  argc,
VALUE argv,
VALUE  klass 
)
static

Definition at line 3690 of file zlib.c.

References gzfile_s_open().

Referenced by Init_zlib().

◆ rb_gzreader_ungetbyte()

static VALUE rb_gzreader_ungetbyte ( VALUE  obj,
VALUE  ch 
)
static

Definition at line 3963 of file zlib.c.

References get_gzfile(), gzfile_ungetbyte(), NUM2CHR, and Qnil.

Referenced by Init_zlib(), and rb_gzreader_ungetc().

◆ rb_gzreader_ungetc()

static VALUE rb_gzreader_ungetc ( VALUE  obj,
VALUE  s 
)
static

◆ rb_gzreader_unused()

static VALUE rb_gzreader_unused ( VALUE  obj)
static

Definition at line 3761 of file zlib.c.

References gzfile_reader_get_unused(), and TypedData_Get_Struct.

Referenced by Init_zlib().

◆ rb_gzwriter_flush()

static VALUE rb_gzwriter_flush ( int  argc,
VALUE argv,
VALUE  obj 
)
static

◆ rb_gzwriter_initialize()

static VALUE rb_gzwriter_initialize ( int  argc,
VALUE argv,
VALUE  obj 
)
static

◆ rb_gzwriter_putc()

static VALUE rb_gzwriter_putc ( VALUE  obj,
VALUE  ch 
)
static

Definition at line 3587 of file zlib.c.

References get_gzfile(), gzfile_write(), and NUM2CHR.

Referenced by Init_zlib().

◆ rb_gzwriter_s_allocate()

static VALUE rb_gzwriter_s_allocate ( VALUE  klass)
static

Definition at line 3472 of file zlib.c.

References gzfile_writer_new.

Referenced by Init_zlib().

◆ rb_gzwriter_s_open()

static VALUE rb_gzwriter_s_open ( int  argc,
VALUE argv,
VALUE  klass 
)
static

Definition at line 3485 of file zlib.c.

References gzfile_s_open().

Referenced by Init_zlib().

◆ rb_gzwriter_write()

static VALUE rb_gzwriter_write ( VALUE  obj,
VALUE  str 
)
static

◆ rb_inflate_add_dictionary()

static VALUE rb_inflate_add_dictionary ( VALUE  obj,
VALUE  dictionary 
)
static

Definition at line 1951 of file zlib.c.

References do_checksum(), id_dictionaries, rb_hash_aset(), and rb_ivar_get().

Referenced by Init_zlib().

◆ rb_inflate_addstr()

static VALUE rb_inflate_addstr ( VALUE  obj,
VALUE  src 
)
static

◆ rb_inflate_inflate()

static VALUE rb_inflate_inflate ( VALUE  obj,
VALUE  src 
)
static

◆ rb_inflate_initialize()

static VALUE rb_inflate_initialize ( int  argc,
VALUE argv,
VALUE  obj 
)
static

Definition at line 1853 of file zlib.c.

References ARG_WBITS, err, raise_zlib_error(), rb_scan_args(), zstream::stream, TypedData_Get_Struct, and ZSTREAM_READY.

Referenced by Init_zlib().

◆ rb_inflate_s_allocate()

static VALUE rb_inflate_s_allocate ( VALUE  klass)
static

Definition at line 1800 of file zlib.c.

References id_dictionaries, rb_hash_new(), rb_ivar_set(), and zstream_inflate_new.

Referenced by Init_zlib().

◆ rb_inflate_s_inflate()

static VALUE rb_inflate_s_inflate ( VALUE  obj,
VALUE  src 
)
static

◆ rb_inflate_set_dictionary()

static VALUE rb_inflate_set_dictionary ( VALUE  obj,
VALUE  dic 
)
static

◆ rb_inflate_sync()

static VALUE rb_inflate_sync ( VALUE  obj,
VALUE  src 
)
static

Definition at line 2067 of file zlib.c.

References get_zstream(), OBJ_INFECT, RSTRING_LEN, RSTRING_PTR, StringValue, and zstream_sync().

Referenced by Init_zlib().

◆ rb_inflate_sync_point_p()

static VALUE rb_inflate_sync_point_p ( VALUE  obj)
static

Definition at line 2084 of file zlib.c.

References err, get_zstream(), Qfalse, Qtrue, raise_zlib_error(), and zstream::stream.

Referenced by Init_zlib().

◆ rb_zlib_adler32()

static VALUE rb_zlib_adler32 ( int  argc,
VALUE argv,
VALUE  klass 
)
static

Definition at line 435 of file zlib.c.

References do_checksum(), NUM2LONG, NUM2ULONG, rb_zlib_adler32_combine, and ULONG2NUM.

Referenced by Init_zlib().

◆ rb_zlib_crc32()

static VALUE rb_zlib_crc32 ( int  argc,
VALUE argv,
VALUE  klass 
)
static

Definition at line 473 of file zlib.c.

References do_checksum(), NUM2LONG, NUM2ULONG, rb_zlib_crc32_combine, and ULONG2NUM.

Referenced by Init_zlib().

◆ rb_zlib_crc_table()

static VALUE rb_zlib_crc_table ( VALUE  obj)
static

Definition at line 505 of file zlib.c.

References rb_ary_new2, rb_ary_push(), and rb_uint2inum().

Referenced by Init_zlib().

◆ rb_zlib_version()

static VALUE rb_zlib_version ( VALUE  klass)
static

Definition at line 361 of file zlib.c.

References checksum_long, func, len, OBJ_TAINT, and rb_str_new2.

Referenced by Init_zlib().

◆ rb_zstream_adler()

static VALUE rb_zstream_adler ( VALUE  obj)
static

Definition at line 1382 of file zlib.c.

References get_zstream(), rb_uint2inum(), and zstream::stream.

Referenced by Init_zlib().

◆ rb_zstream_avail_in()

static VALUE rb_zstream_avail_in ( VALUE  obj)
static

Definition at line 1342 of file zlib.c.

References zstream::input, INT2FIX, NIL_P, RSTRING_LEN, and TypedData_Get_Struct.

Referenced by Init_zlib().

◆ rb_zstream_avail_out()

static VALUE rb_zstream_avail_out ( VALUE  obj)
static

Definition at line 1316 of file zlib.c.

References rb_uint2inum(), zstream::stream, and TypedData_Get_Struct.

Referenced by Init_zlib().

◆ rb_zstream_closed_p()

static VALUE rb_zstream_closed_p ( VALUE  obj)
static

Definition at line 1400 of file zlib.c.

References Qfalse, Qtrue, TypedData_Get_Struct, and ZSTREAM_IS_READY.

Referenced by Init_zlib().

◆ rb_zstream_data_type()

static VALUE rb_zstream_data_type ( VALUE  obj)
static

Definition at line 1373 of file zlib.c.

References get_zstream(), INT2FIX, and zstream::stream.

Referenced by Init_zlib().

◆ rb_zstream_end()

static VALUE rb_zstream_end ( VALUE  obj)
static

Definition at line 1239 of file zlib.c.

References get_zstream(), Qnil, and zstream_end().

Referenced by Init_zlib().

◆ rb_zstream_finish()

static VALUE rb_zstream_finish ( VALUE  obj)
static

Definition at line 1266 of file zlib.c.

References get_zstream(), zstream_detach_buffer(), and zstream_run().

Referenced by Init_zlib().

◆ rb_zstream_finished_p()

static VALUE rb_zstream_finished_p ( VALUE  obj)
static

Definition at line 1391 of file zlib.c.

References get_zstream(), Qfalse, Qtrue, and ZSTREAM_IS_FINISHED.

Referenced by Init_zlib().

◆ rb_zstream_flush_next_in()

static VALUE rb_zstream_flush_next_in ( VALUE  obj)
static

Definition at line 1281 of file zlib.c.

References OBJ_INFECT, TypedData_Get_Struct, and zstream_detach_input().

Referenced by Init_zlib().

◆ rb_zstream_flush_next_out()

static VALUE rb_zstream_flush_next_out ( VALUE  obj)
static

Definition at line 1302 of file zlib.c.

References TypedData_Get_Struct, and zstream_detach_buffer().

Referenced by Init_zlib().

◆ rb_zstream_reset()

static VALUE rb_zstream_reset ( VALUE  obj)
static

Definition at line 1250 of file zlib.c.

References get_zstream(), Qnil, and zstream_reset().

Referenced by Init_zlib().

◆ rb_zstream_set_avail_out()

static VALUE rb_zstream_set_avail_out ( VALUE  obj,
VALUE  size 
)
static

Definition at line 1330 of file zlib.c.

References FIX2INT, get_zstream(), size, and zstream_expand_buffer_into().

Referenced by Init_zlib().

◆ rb_zstream_total_in()

static VALUE rb_zstream_total_in ( VALUE  obj)
static

Definition at line 1353 of file zlib.c.

References get_zstream(), rb_uint2inum(), and zstream::stream.

Referenced by Init_zlib().

◆ rb_zstream_total_out()

static VALUE rb_zstream_total_out ( VALUE  obj)
static

Definition at line 1362 of file zlib.c.

References get_zstream(), rb_uint2inum(), and zstream::stream.

Referenced by Init_zlib().

◆ rscheck()

static void rscheck ( const char *  rsptr,
long  rslen,
VALUE  rs 
)
static

Definition at line 4002 of file zlib.c.

References rb_eRuntimeError, rb_raise(), RSTRING_LEN, and RSTRING_PTR.

Referenced by gzreader_gets().

◆ zlib_gunzip()

static VALUE zlib_gunzip ( VALUE  klass,
VALUE  src 
)
static

◆ zlib_gunzip_end()

static void zlib_gunzip_end ( struct gzfile gz)
static

Definition at line 4327 of file zlib.c.

References zstream::flags, gzfile_check_footer(), gzfile::z, zstream_end(), and ZSTREAM_FLAG_CLOSING.

Referenced by zlib_gunzip().

◆ zlib_gzip_end()

static void zlib_gzip_end ( struct gzfile gz)
static

◆ zlib_mem_alloc()

static voidpf zlib_mem_alloc ( voidpf  opaque,
uInt  items,
uInt  size 
)
static

Definition at line 581 of file zlib.c.

References VALGRIND_MAKE_MEM_DEFINED, and xmalloc2().

Referenced by zstream_init().

◆ zlib_mem_free()

static void zlib_mem_free ( voidpf  opaque,
voidpf  address 
)
static

Definition at line 593 of file zlib.c.

References xfree().

Referenced by zstream_init().

◆ zlib_s_gzip()

static VALUE zlib_s_gzip ( int  argc,
VALUE argv,
VALUE  klass 
)
static

◆ zstream_append_buffer()

static void zstream_append_buffer ( struct zstream z,
const Bytef *  src,
long  len 
)
static

◆ zstream_append_input()

static void zstream_append_input ( struct zstream z,
const Bytef *  src,
long  len 
)
static

Definition at line 827 of file zlib.c.

References zstream::input, NIL_P, rb_obj_hide(), rb_str_buf_cat(), and rb_str_buf_new().

Referenced by zstream_run(), and zstream_sync().

◆ zstream_buffer_ungetbyte()

static void zstream_buffer_ungetbyte ( struct zstream z,
int  c 
)
static

Definition at line 820 of file zlib.c.

References zstream_buffer_ungets().

Referenced by gzfile_ungetbyte().

◆ zstream_buffer_ungets()

static void zstream_buffer_ungets ( struct zstream z,
const Bytef *  b,
unsigned long  len 
)
static

◆ zstream_detach_buffer()

static VALUE zstream_detach_buffer ( struct zstream z)
static

◆ zstream_detach_input()

static VALUE zstream_detach_input ( struct zstream z)
static

Definition at line 873 of file zlib.c.

References zstream::input, NIL_P, Qnil, rb_cString, rb_obj_reveal(), and rb_str_new().

Referenced by rb_zstream_flush_next_in().

◆ zstream_discard_input()

static void zstream_discard_input ( struct zstream z,
long  len 
)
static

Definition at line 846 of file zlib.c.

References zstream::input, NIL_P, Qnil, rb_str_substr(), and RSTRING_LEN.

Referenced by gzfile_check_footer(), gzfile_read_header(), and zstream_sync().

◆ zstream_end()

static VALUE zstream_end ( struct zstream z)
static

◆ zstream_expand_buffer()

static void zstream_expand_buffer ( struct zstream z)
static

◆ zstream_expand_buffer_into()

static void zstream_expand_buffer_into ( struct zstream z,
unsigned long  size 
)
static

◆ zstream_expand_buffer_non_stream()

static int zstream_expand_buffer_non_stream ( struct zstream z)
static

◆ zstream_expand_buffer_protect()

static void* zstream_expand_buffer_protect ( void *  ptr)
static

Definition at line 674 of file zlib.c.

References rb_protect(), and zstream_expand_buffer().

Referenced by zstream_run_func().

◆ zstream_finalize()

static void zstream_finalize ( struct zstream z)
static

Definition at line 1110 of file zlib.c.

References zstream::zstream_funcs::end, err, finalizer_warn(), zstream::func, and zstream::stream.

Referenced by gzfile_free(), and zstream_free().

◆ zstream_free()

static void zstream_free ( void *  p)
static

Definition at line 1120 of file zlib.c.

References xfree(), zstream_finalize(), and ZSTREAM_IS_READY.

◆ zstream_init()

static void zstream_init ( struct zstream z,
const struct zstream_funcs *  func 
)
static

◆ zstream_mark()

static void zstream_mark ( void *  p)
static

Definition at line 1102 of file zlib.c.

References zstream::buf, zstream::input, and rb_gc_mark().

Referenced by gzfile_mark().

◆ zstream_memsize()

static size_t zstream_memsize ( const void *  p)
static

Definition at line 1131 of file zlib.c.

◆ zstream_new()

static VALUE zstream_new ( VALUE  klass,
const struct zstream_funcs *  funcs 
)
static

Definition at line 1144 of file zlib.c.

References zstream::stream, TypedData_Make_Struct, and zstream_init().

◆ zstream_passthrough_input()

static void zstream_passthrough_input ( struct zstream z)
static

Definition at line 864 of file zlib.c.

References zstream::input, NIL_P, Qnil, and zstream_append_buffer2.

Referenced by rb_inflate_addstr(), and rb_inflate_inflate().

◆ zstream_reset()

static void zstream_reset ( struct zstream z)
static

◆ zstream_reset_input()

static void zstream_reset_input ( struct zstream z)
static

Definition at line 858 of file zlib.c.

References zstream::input, and Qnil.

Referenced by zstream_end(), zstream_reset(), zstream_run(), and zstream_sync().

◆ zstream_run()

static void zstream_run ( struct zstream z,
Bytef *  src,
long  len,
int  flush 
)
static

◆ zstream_run_func()

static void* zstream_run_func ( void *  ptr)
static

◆ zstream_shift_buffer()

static VALUE zstream_shift_buffer ( struct zstream z,
long  len 
)
static

◆ zstream_sync()

static VALUE zstream_sync ( struct zstream z,
Bytef *  src,
long  len 
)
static

◆ zstream_unblock_func()

static void zstream_unblock_func ( void *  ptr)
static

Definition at line 986 of file zlib.c.

References zstream_run_args::interrupt.

Referenced by zstream_run().

Variable Documentation

◆ cBufError

VALUE cBufError
static

Definition at line 299 of file zlib.c.

◆ cCRCError

VALUE cCRCError
static

Definition at line 2171 of file zlib.c.

◆ cDataError

VALUE cDataError
static

Definition at line 299 of file zlib.c.

◆ cGzError

VALUE cGzError
static

Definition at line 2171 of file zlib.c.

◆ cLengthError

VALUE cLengthError
static

Definition at line 2171 of file zlib.c.

◆ cMemError

VALUE cMemError
static

Definition at line 299 of file zlib.c.

◆ cNeedDict

VALUE cNeedDict
static

Definition at line 298 of file zlib.c.

◆ cNoFooter

VALUE cNoFooter
static

Definition at line 2171 of file zlib.c.

◆ cStreamEnd

VALUE cStreamEnd
static

Definition at line 298 of file zlib.c.

◆ cStreamError

VALUE cStreamError
static

Definition at line 299 of file zlib.c.

◆ cVersionError

VALUE cVersionError
static

Definition at line 299 of file zlib.c.

◆ cZError

VALUE cZError
static

Definition at line 298 of file zlib.c.

◆ deflate_funcs

const struct zstream_funcs deflate_funcs
static
Initial value:
= {
deflateReset, deflateEnd, deflate,
}

Definition at line 564 of file zlib.c.

◆ gzfile_data_type

const rb_data_type_t gzfile_data_type
static
Initial value:
= {
"gzfile",
}
#define RUBY_TYPED_FREE_IMMEDIATELY
Definition: ruby.h:1145
static size_t gzfile_memsize(const void *p)
Definition: zlib.c:2241
static void gzfile_free(void *)
Definition: zlib.c:2223
static void gzfile_mark(void *)
Definition: zlib.c:2210

Definition at line 2252 of file zlib.c.

◆ id_close

ID id_close
static

Definition at line 2170 of file zlib.c.

◆ id_dictionaries

ID id_dictionaries
static

Definition at line 55 of file zlib.c.

Referenced by Init_zlib(), rb_inflate_add_dictionary(), rb_inflate_s_allocate(), and zstream_run().

◆ id_flush

ID id_flush
static

Definition at line 2170 of file zlib.c.

◆ id_input

ID id_input
static

Definition at line 2170 of file zlib.c.

◆ id_level

ID id_level
static

Definition at line 4259 of file zlib.c.

Referenced by zlib_s_gzip().

◆ id_path

ID id_path
static

Definition at line 2170 of file zlib.c.

◆ id_read

ID id_read
static

Definition at line 2170 of file zlib.c.

◆ id_readpartial

ID id_readpartial
static

Definition at line 2170 of file zlib.c.

◆ id_seek

ID id_seek
static

Definition at line 2170 of file zlib.c.

◆ id_strategy

ID id_strategy
static

Definition at line 4259 of file zlib.c.

Referenced by zlib_s_gzip().

◆ id_write

ID id_write
static

Definition at line 2170 of file zlib.c.

◆ inflate_funcs

const struct zstream_funcs inflate_funcs
static
Initial value:
= {
inflateReset, inflateEnd, inflate,
}

Definition at line 568 of file zlib.c.

◆ zstream_data_type

const rb_data_type_t zstream_data_type
static
Initial value:
= {
"zstream",
}
#define RUBY_TYPED_FREE_IMMEDIATELY
Definition: ruby.h:1145
static void zstream_free(void *)
Definition: zlib.c:1120
static void zstream_mark(void *)
Definition: zlib.c:1102
static size_t zstream_memsize(const void *p)
Definition: zlib.c:1131

Definition at line 1137 of file zlib.c.