Rizin
unix-like reverse engineering framework and cli tools
test.cpp File Reference
#include "zfstream.h"

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

◆ main()

int main ( void  )

Definition at line 4 of file test.cpp.

4  {
5 
6  // Construct a stream object with this filebuffer. Anything sent
7  // to this stream will go to standard out.
8  gzofstream os( 1, ios::out );
9 
10  // This text is getting compressed and sent to stdout.
11  // To prove this, run 'test | zcat'.
12  os << "Hello, Mommy" << endl;
13 
15  os << "hello, hello, hi, ho!" << endl;
16 
18  << "I'm compressing again" << endl;
19 
20  os.close();
21 
22  return 0;
23 
24 }
const lzma_allocator const uint8_t size_t uint8_t * out
Definition: block.h:528
Gzipped file output stream class.
Definition: zfstream.h:80
void close()
Close gzipped file.
Definition: zfstream.cc:475
gzofstream & setcompressionlevel(gzofstream &s, int l)
Definition: zfstream.h:106
#define Z_NO_COMPRESSION
Definition: zlib.h:190
#define Z_DEFAULT_COMPRESSION
Definition: zlib.h:193

References gzofstream::close(), out, setcompressionlevel(), Z_DEFAULT_COMPRESSION, and Z_NO_COMPRESSION.