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

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

Macros | Functions
infback9.c File Reference
`#include "zutil.h"`
`#include "infback9.h"`
`#include "inftree9.h"`
`#include "inflate9.h"`
`#include "inffix9.h"`

Go to the source code of this file.

## Macros
#define | WSIZE 65536UL
#define | INITBITS()
#define | PULL()
#define | PULLBYTE()
#define | NEEDBITS(n)
#define | BITS(n) ((unsigned)hold & ((1U << (n)) - 1))
#define | DROPBITS(n)
#define | BYTEBITS()
#define | ROOM()

## Functions
int ZEXPORT | inflateBack9Init_ (z_stream FAR *strm, unsigned char FAR *window, const char *version, int stream_size)
int ZEXPORT | inflateBack9 (z_stream FAR *strm, in_func in, void FAR *in_desc, out_func out, void FAR *out_desc)
int ZEXPORT | inflateBack9End (z_stream FAR *strm)

## Macro Definition Documentation

## ◆ BITS

#define BITS | ( |  | n | ) | ((unsigned)hold & ((1U << (n)) - 1))

Definition at line 157 of file infback9.c.

## ◆ BYTEBITS

#define BYTEBITS | ( |  | ) |

Value:
do { \
hold >>= bits & 7; \
bits -= bits & 7; \
} while (0)
bits
int bits(struct state *s, int need)
Definition: blast.c:72

Definition at line 168 of file infback9.c.

## ◆ DROPBITS

#define DROPBITS | ( |  | n | ) |

Value:
do { \
hold >>= (n); \
bits -= (unsigned)(n); \
} while (0)

Definition at line 161 of file infback9.c.

## ◆ INITBITS

#define INITBITS | ( |  | ) |

Value:
do { \
hold = 0; \
bits = 0; \
} while (0)

Definition at line 117 of file infback9.c.

## ◆ NEEDBITS

#define NEEDBITS | ( |  | n | ) |

Value:
do { \
while (bits < (unsigned)(n)) \
PULLBYTE(); \
} while (0)

Definition at line 150 of file infback9.c.

## ◆ PULL

#define PULL | ( |  | ) |

Value:
do { \
if (have == 0) { \
have = in(in_desc, &next); \
if (have == 0) { \
next = Z_NULL; \
ret = Z_BUF_ERROR; \
goto inf_leave; \
} \
} \
} while (0)
in
unsigned in(void *in_desc, z_const unsigned char **buf)
Definition: gun.c:89
Z_BUF_ERROR
#define Z_BUF_ERROR
Definition: zlib.h:184
Z_NULL
#define Z_NULL
Definition: zlib.h:212

Definition at line 125 of file infback9.c.

## ◆ PULLBYTE

#define PULLBYTE | ( |  | ) |

Value:
do { \
PULL(); \
have--; \
hold += (unsigned long)(*next++) << bits; \
bits += 8; \
} while (0)
long
typedef long(ZCALLBACK *tell_file_func) OF((voidpf opaque

Definition at line 139 of file infback9.c.

## ◆ ROOM

#define ROOM | ( |  | ) |

Value:
do { \
if (left == 0) { \
put = window; \
left = WSIZE; \
wrap = 1; \
if (out(out_desc, put, (unsigned)left)) { \
ret = Z_BUF_ERROR; \
goto inf_leave; \
} \
} \
} while (0)
out
string_t out
Definition: enough.c:230
WSIZE
#define WSIZE
Definition: infback9.c:11

Definition at line 177 of file infback9.c.

## ◆ WSIZE

#define WSIZE 65536UL

Definition at line 11 of file infback9.c.

## Function Documentation

## ◆ inflateBack9()

int ZEXPORT inflateBack9 | ( | z_stream FAR * | strm,
|  | in_func | in,
|  | void FAR * | in_desc,
|  | out_func | out,
|  | void FAR * | out_desc
| ) |  |

Definition at line 217 of file infback9.c.

References BAD, BITS, bits(), code::bits, BYTEBITS, CODES, inflate_state::distbits, inflate_state::distcode, DISTS, DONE, DROPBITS, inflate_state::extra, FAR, inflate_state::have, inflate_state::hold, if(), inflate_table9(), INITBITS, last, len, LEN, inflate_state::lenbits, inflate_state::lencode, inflate_state::length, LENS, NEEDBITS, state::next, inflate_state::next, code::op, out, PULL, PULLBYTE, ROOM, STORED, inflate_state::strm, TABLE, Tracev, Tracevv, TYPE, code::val, inflate_state::window, inflate_state::wrap, WSIZE, Z_BUF_ERROR, z_const, Z_DATA_ERROR, Z_NULL, Z_STREAM_END, Z_STREAM_ERROR, and zmemcpy.

## ◆ inflateBack9End()

int ZEXPORT inflateBack9End | ( | z_stream FAR * | strm | ) |

Definition at line 606 of file infback9.c.

References inflate_state::strm, Tracev, Z_NULL, Z_OK, Z_STREAM_ERROR, and ZFREE.

## ◆ inflateBack9Init_()

int ZEXPORT inflateBack9Init_ | ( | z_stream FAR * | strm,
|  | unsigned char FAR * | window,
|  | const char * | version,
|  | int | stream_size
| ) |  |

Definition at line 19 of file infback9.c.

References FAR, inflate_state::strm, Tracev, inflate_state::window, Z_MEM_ERROR, Z_NULL, Z_OK, Z_STREAM_ERROR, Z_VERSION_ERROR, ZALLOC, zcalloc(), zcfree(), and ZLIB_VERSION.