Ruby: ext/zlib/zlib-1.2.13/contrib/blast/blast.c File Reference

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

Data Structures | Macros | Functions
blast.c File Reference
`#include <stddef.h>`
`#include <setjmp.h>`
`#include "blast.h"`

Go to the source code of this file.

## Data Structures
struct | state
struct | huffman

## Macros
#define | local static /* for local function definitions */
#define | MAXBITS 13 /* maximum code length */
#define | MAXWIN 4096 /* maximum window size */

## Functions
int | bits (struct state *s, int need)
int | decode (struct state *s, struct huffman *h)
int | construct (struct huffman *h, const unsigned char *rep, int n)
int | decomp (struct state *s)
int | blast (blast_in infun, void *inhow, blast_out outfun, void *outhow, unsigned *left, unsigned char **in)

## Macro Definition Documentation

## ◆ local

#define local static /* for local function definitions */

Definition at line 36 of file blast.c.

## ◆ MAXBITS

#define MAXBITS 13 /* maximum code length */

Definition at line 37 of file blast.c.

## ◆ MAXWIN

#define MAXWIN 4096 /* maximum window size */

Definition at line 38 of file blast.c.

## Function Documentation

## ◆ bits()

int bits | ( | struct state * | s,
|  | int | need
| ) |  |

Definition at line 72 of file blast.c.

References state::bitbuf, state::bitcnt, state::env, state::in, state::infun, state::inhow, int(), and state::left.

Referenced by decomp(), deflatePending(), deflatePrime(), examine(), fixedtables(), gen_bitlen(), gen_codes(), gzip_normalize(), inflate(), inflate_fast(), inflate_table(), inflate_table9(), inflateBack(), inflateBack9(), inflatePrime(), lunpipe(), main(), and tr_static_init().

## ◆ blast()

int blast | ( | blast_in | infun,
|  | void * | inhow,
|  | blast_out | outfun,
|  | void * | outhow,
|  | unsigned * | left,
|  | unsigned char ** | in
| ) |  |

Definition at line 383 of file blast.c.

References state::bitbuf, state::bitcnt, decomp(), state::env, err, state::first, state::in, in(), state::infun, state::inhow, state::left, state::next, NULL, state::out, state::outfun, and state::outhow.

## ◆ construct()

int construct | ( | struct huffman * | h,
|  | const unsigned char * | rep,
|  | int | n
| ) |  |

Definition at line 191 of file blast.c.

References huffman::count, len, MAXBITS, and huffman::symbol.

Referenced by decomp().

## ◆ decode()

int decode | ( | struct state * | s,
|  | struct huffman * | h
| ) |  |

Definition at line 129 of file blast.c.

References state::bitbuf, state::bitcnt, count, huffman::count, state::env, state::in, state::infun, state::inhow, state::left, len, MAXBITS, and huffman::symbol.

Referenced by decomp().

## ◆ decomp()

int decomp | ( | struct state * | s | ) |

Definition at line 282 of file blast.c.

References bits(), construct(), decode(), state::first, len, MAXBITS, MAXWIN, state::next, state::out, state::outfun, state::outhow, and huffman::symbol.

Referenced by blast().