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

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

Macros | Functions
compress.c File Reference
`#include "zlib.h"`

Go to the source code of this file.

## Macros
#define | ZLIB_INTERNAL

## Functions
int ZEXPORT | compress2 (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, int level)
int ZEXPORT | compress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)
uLong ZEXPORT | compressBound (uLong sourceLen)

## Macro Definition Documentation

## ◆ ZLIB_INTERNAL

#define ZLIB_INTERNAL

Definition at line 8 of file compress.c.

## Function Documentation

## ◆ compress()

int ZEXPORT compress | ( | Bytef * | dest,
|  | uLongf * | destLen,
|  | const Bytef * | source,
|  | uLong | sourceLen
| ) |  |

Definition at line 68 of file compress.c.

References compress2(), and Z_DEFAULT_COMPRESSION.

## ◆ compress2()

int ZEXPORT compress2 | ( | Bytef * | dest,
|  | uLongf * | destLen,
|  | const Bytef * | source,
|  | uLong | sourceLen,
|  | int | level
| ) |  |

Definition at line 22 of file compress.c.

References deflate(), deflateEnd(), deflateInit, err, max, z_const, Z_FINISH, Z_NO_FLUSH, Z_OK, and Z_STREAM_END.

Referenced by compress().

## ◆ compressBound()

uLong ZEXPORT compressBound | ( | uLong | sourceLen | ) |

Definition at line 81 of file compress.c.