Ruby: ext/zlib/zlib-1.2.13/examples/zran.h File Reference

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

Data Structures | Functions
zran.h File Reference
`#include <stdio.h>`
`#include "zlib.h"`

Go to the source code of this file.

## Data Structures
struct | deflate_index

## Functions
int | deflate_index_build (FILE *in, off_t span, struct deflate_index **built)
void | deflate_index_free (struct deflate_index *index)
int | deflate_index_extract (FILE *in, struct deflate_index *index, off_t offset, unsigned char *buf, int len)

## Function Documentation

## ◆ deflate_index_build()

int deflate_index_build | ( | FILE * | in,
|  | off_t | span,
|  | struct deflate_index ** | built
| ) |  |

Definition at line 135 of file zran.c.

References z_stream_s::avail_in, z_stream_s::avail_out, CHUNK, z_stream_s::data_type, deflate_index_free(), EOF, ferror, getc, deflate_index::gzip, deflate_index::have, in(), inflate(), inflateEnd(), inflateInit2, inflateReset(), input, last, deflate_index::length, deflate_index::list, z_stream_s::next_in, z_stream_s::next_out, NULL, off_t, z_stream_s::opaque, realloc, ungetc, WINSIZE, Z_BLOCK, Z_DATA_ERROR, Z_ERRNO, Z_MEM_ERROR, Z_NEED_DICT, Z_NULL, Z_OK, Z_STREAM_END, z_stream_s::zalloc, and z_stream_s::zfree.

## ◆ deflate_index_extract()

int deflate_index_extract | ( | FILE * | in,
|  | struct deflate_index * | index,
|  | off_t | offset,
|  | unsigned char * | buf,
|  | int | len
| ) |  |

Definition at line 248 of file zran.c.

References z_stream_s::avail_in, z_stream_s::avail_out, point::bits, CHUNK, z_stream_s::data_type, EOF, ferror, getc, deflate_index::gzip, deflate_index::have, in(), point::in, inflate(), inflateEnd(), inflateInit2, inflatePrime(), inflateReset2(), inflateSetDictionary(), input, len, deflate_index::list, z_stream_s::next_in, z_stream_s::next_out, z_stream_s::opaque, out, point::out, SEEK_CUR, SEEK_SET, skip(), ungetc, point::window, WINSIZE, Z_BLOCK, Z_DATA_ERROR, Z_ERRNO, Z_MEM_ERROR, Z_NEED_DICT, Z_NO_FLUSH, Z_NULL, Z_OK, Z_STREAM_END, z_stream_s::zalloc, and z_stream_s::zfree.

## ◆ deflate_index_free()

void deflate_index_free | ( | struct deflate_index * | index | ) |

Definition at line 76 of file zran.c.

References free, deflate_index::list, and NULL.

Referenced by deflate_index_build().