Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
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 }
Gzipped file output stream class.
Definition: zfstream.h:80
#define Z_DEFAULT_COMPRESSION
Definition: zlib.h:148
int main()
Definition: test.cpp:4
local int out(void *out_desc, unsigned char *buf, unsigned len)
Definition: gun.c:131
void close()
Close gzipped file.
Definition: zfstream.cc:475
#define Z_NO_COMPRESSION
Definition: zlib.h:145
gzofstream & setcompressionlevel(gzofstream &s, int l)
Definition: zfstream.h:106