Ruby: ozstream Class Reference

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

Public Member Functions
ozstream Class Reference

`#include <zstream.h>`

## Public Member Functions
| ozstream ()
| ozstream (FILE *fp, int level=Z_DEFAULT_COMPRESSION)
| ozstream (const char *name, int level=Z_DEFAULT_COMPRESSION)
| ~ozstream ()
void | open (const char *name, int level=Z_DEFAULT_COMPRESSION)
void | open (FILE *fp, int level=Z_DEFAULT_COMPRESSION)
int | close ()
int | write (const void *buf, size_t len)
int | flush (int _flush)
const char * | error (int *errnum)
gzFile | fp ()
ostream & | os ()
void | os_flush ()

## Detailed Description

Definition at line 155 of file zstream.h.

## Constructor & Destructor Documentation

## ◆ ozstream() [1/3]

ozstream::ozstream | ( |  | ) |
| inline

Definition at line 158 of file zstream.h.

## ◆ ozstream() [2/3]

ozstream::ozstream | ( | FILE * | fp,
|  | int | level = `Z_DEFAULT_COMPRESSION`
| ) |  |
| inline

Definition at line 160 of file zstream.h.

References fp(), and open().

## ◆ ozstream() [3/3]

ozstream::ozstream | ( | const char * | name,
|  | int | level = `Z_DEFAULT_COMPRESSION`
| ) |  |
| inline

Definition at line 164 of file zstream.h.

References name, and open().

## ◆ ~ozstream()

ozstream::~ozstream | ( |  | ) |
| inline

Definition at line 168 of file zstream.h.

References close().

## Member Function Documentation

## ◆ close()

int ozstream::close | ( |  | ) |
| inline

Definition at line 198 of file zstream.h.

References gzclose(), and gzwrite().

Referenced by open(), and ~ozstream().

## ◆ error()

const char * ozstream::error | ( | int * | errnum | ) |
| inline

Definition at line 230 of file zstream.h.

## ◆ flush()

int ozstream::flush | ( | int | _flush | ) |
| inline

Definition at line 219 of file zstream.h.

References os_flush().

## ◆ fp()

gzFile ozstream::fp | ( |  | ) |
| inline

Definition at line 234 of file zstream.h.

Referenced by open(), operator<(), ozstream(), and write().

## ◆ open() [1/2]

void ozstream::open | ( | const char * | name,
|  | int | level = `Z_DEFAULT_COMPRESSION`
| ) |  |
| inline

Definition at line 177 of file zstream.h.

References close(), gzopen(), name, and Z_DEFAULT_COMPRESSION.

Referenced by ozstream().

## ◆ open() [2/2]

void ozstream::open | ( | FILE * | fp,
|  | int | level = `Z_DEFAULT_COMPRESSION`
| ) |  |
| inline

Definition at line 186 of file zstream.h.

References close(), fileno, fp(), gzdopen(), SET_BINARY_MODE, and Z_DEFAULT_COMPRESSION.

## ◆ os()

ostream & ozstream::os | ( |  | ) |
| inline

Definition at line 236 of file zstream.h.

Referenced by operator<<().

## ◆ os_flush()

void ozstream::os_flush | ( |  | ) |
| inline

Definition at line 241 of file zstream.h.

References gzwrite().

Referenced by flush(), and operator<<().

## ◆ write()

int ozstream::write | ( | const void * | buf,
|  | size_t | len
| ) |  |
| inline

Definition at line 208 of file zstream.h.

References len.

The documentation for this class was generated from the following file:

- ext/zlib/zlib-1.2.13/contrib/iostream2/zstream.h