Rizin
unix-like reverse engineering framework and cli tools
test.cpp
Go to the documentation of this file.
1 
2 #include "zfstream.h"
3 
4 int main() {
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
int main()
Definition: test.cpp:4
#define Z_NO_COMPRESSION
Definition: zlib.h:190
#define Z_DEFAULT_COMPRESSION
Definition: zlib.h:193