Ruby: ext/zlib/zlib-1.2.13/gzlib.c File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Macros | Functions
gzlib.c File Reference
`#include "gzguts.h"`

Go to the source code of this file.

## Macros
#define | LSEEK lseek

## Functions
void gz_reset | OF ((gz_statep))
gzFile gz_open | OF ((const void *, int, const char *))
void | gz_reset (gz_statep state)
gzFile | gz_open (void *path, int fd, const char *mode) const
gzFile ZEXPORT | gzopen (char *path, const char *mode) const
gzFile ZEXPORT | gzopen64 (char *path, const char *mode) const
gzFile ZEXPORT | gzdopen (int fd, const char *mode)
int ZEXPORT | gzbuffer (gzFile file, unsigned size)
int ZEXPORT | gzrewind (gzFile file)
z_off64_t ZEXPORT | gzseek64 (gzFile file, z_off64_t offset, int whence)
z_off_t ZEXPORT | gzseek (gzFile file, z_off_t offset, int whence)
z_off64_t ZEXPORT | gztell64 (gzFile file)
z_off_t ZEXPORT | gztell (gzFile file)
z_off64_t ZEXPORT | gzoffset64 (gzFile file)
z_off_t ZEXPORT | gzoffset (gzFile file)
int ZEXPORT | gzeof (gzFile file)
const char *ZEXPORT | gzerror (gzFile file, int *errnum)
void ZEXPORT | gzclearerr (gzFile file)
void ZLIB_INTERNAL | gz_error (gz_statep state, int err, const char *msg)
unsigned ZLIB_INTERNAL | gz_intmax ()

## Macro Definition Documentation

## ◆ LSEEK

#define LSEEK lseek

Definition at line 14 of file gzlib.c.

## Function Documentation

## ◆ gz_error()

void ZLIB_INTERNAL gz_error | ( | gz_statep | state,
|  | int | err,
|  | const char * | msg
| ) |  |

Definition at line 581 of file gzlib.c.

References err, free, malloc, NULL, snprintf, strlen(), Z_BUF_ERROR, Z_MEM_ERROR, and Z_OK.

Referenced by gz_comp(), gz_decomp(), gz_init(), gz_load(), gz_look(), gz_reset(), gzclearerr(), gzclose_r(), gzclose_w(), gzfread(), gzfwrite(), gzputs(), gzread(), gzseek64(), gzungetc(), and gzwrite().

## ◆ gz_intmax()

unsigned ZLIB_INTERNAL gz_intmax | ( |  | ) |

Definition at line 627 of file gzlib.c.

## ◆ gz_open()

gzFile gz_open | ( | void * | path,
|  | int | fd,
|  | const char * | mode
| ) |  | const

Definition at line 93 of file gzlib.c.

References free, GZ_APPEND, GZ_NONE, GZ_READ, gz_reset(), GZ_WRITE, GZBUFSIZE, len, LSEEK, malloc, NULL, O_BINARY, O_CLOEXEC, SEEK_CUR, SEEK_END, snprintf, strlen(), Z_DEFAULT_COMPRESSION, Z_DEFAULT_STRATEGY, Z_FILTERED, Z_FIXED, Z_HUFFMAN_ONLY, and Z_RLE.

Referenced by gzdopen(), gzopen(), and gzopen64().

## ◆ gz_reset()

void gz_reset | ( | gz_statep | state | ) |

Definition at line 75 of file gzlib.c.

References gz_error(), GZ_READ, LOOK, NULL, and Z_OK.

Referenced by gz_open(), and gzrewind().

## ◆ gzbuffer()

int ZEXPORT gzbuffer | ( | gzFile | file,
|  | unsigned | size
| ) |  |

Definition at line 318 of file gzlib.c.

References GZ_READ, GZ_WRITE, and NULL.

## ◆ gzclearerr()

void ZEXPORT gzclearerr | ( | gzFile | file | ) |

Definition at line 555 of file gzlib.c.

References gz_error(), GZ_READ, GZ_WRITE, NULL, and Z_OK.

## ◆ gzdopen()

gzFile ZEXPORT gzdopen | ( | int | fd,
|  | const char * | mode
| ) |  |

Definition at line 288 of file gzlib.c.

References free, gz_open(), malloc, NULL, and snprintf.

Referenced by izstream::open(), and ozstream::open().

## ◆ gzeof()

int ZEXPORT gzeof | ( | gzFile | file | ) |

Definition at line 517 of file gzlib.c.

References GZ_READ, GZ_WRITE, and NULL.

## ◆ gzerror()

const char *ZEXPORT gzerror | ( | gzFile | file,
|  | int * | errnum
| ) |  |

Definition at line 534 of file gzlib.c.

References GZ_READ, GZ_WRITE, NULL, and Z_MEM_ERROR.

Referenced by tar().

## ◆ gzoffset()

z_off_t ZEXPORT gzoffset | ( | gzFile | file | ) |

Definition at line 507 of file gzlib.c.

References gzoffset64(), z_off64_t, and z_off_t.

## ◆ gzoffset64()

z_off64_t ZEXPORT gzoffset64 | ( | gzFile | file | ) |

Definition at line 484 of file gzlib.c.

References GZ_READ, GZ_WRITE, LSEEK, NULL, SEEK_CUR, and z_off64_t.

Referenced by gzoffset().

## ◆ gzopen()

gzFile ZEXPORT gzopen | ( | char * | path,
|  | const char * | mode
| ) |  | const

Definition at line 272 of file gzlib.c.

References gz_open().

Referenced by main(), izstream::open(), and ozstream::open().

## ◆ gzopen64()

gzFile ZEXPORT gzopen64 | ( | char * | path,
|  | const char * | mode
| ) |  | const

Definition at line 280 of file gzlib.c.

References gz_open().

## ◆ gzrewind()

int ZEXPORT gzrewind | ( | gzFile | file | ) |

Definition at line 345 of file gzlib.c.

References GZ_READ, gz_reset(), LSEEK, NULL, SEEK_SET, Z_BUF_ERROR, and Z_OK.

Referenced by gzseek64().

## ◆ gzseek()

z_off_t ZEXPORT gzseek | ( | gzFile | file,
|  | z_off_t | offset,
|  | int | whence
| ) |  |

Definition at line 445 of file gzlib.c.

References gzseek64(), z_off64_t, and z_off_t.

## ◆ gzseek64()

z_off64_t ZEXPORT gzseek64 | ( | gzFile | file,
|  | z_off64_t | offset,
|  | int | whence
| ) |  |

Definition at line 368 of file gzlib.c.

References COPY, GT_OFF, gz_error(), GZ_READ, GZ_WRITE, gzrewind(), LSEEK, state::next, NULL, SEEK_CUR, SEEK_SET, Z_BUF_ERROR, z_off64_t, and Z_OK.

Referenced by gzseek().

## ◆ gztell()

z_off_t ZEXPORT gztell | ( | gzFile | file | ) |

Definition at line 474 of file gzlib.c.

References gztell64(), z_off64_t, and z_off_t.

## ◆ gztell64()

z_off64_t ZEXPORT gztell64 | ( | gzFile | file | ) |

Definition at line 457 of file gzlib.c.

References GZ_READ, GZ_WRITE, and NULL.

Referenced by gztell().

## ◆ OF() [1/2]

gzFile gz_open OF | ( | (const void *, int, const char *) |  | ) |

## ◆ OF() [2/2]

void gz_reset OF | ( | (gz_statep) |  | ) |