ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/s10k/CommonLibs/zlib-1.2.8/contrib/iostream/test.cpp
Revision: 1096
Committed: Sat Dec 30 14:40:33 2017 UTC (7 years, 9 months ago) by s10k
Content type: text/x-c++src
File size: 526 byte(s)
Log Message:
Added zlib, quazip, basicxmlsyntaxhighlighter, conditionalsemaphore and linenumberdisplay libraries. zlib and quazip are pre-compiled, but you can compile them yourself, just delete the dll files (or equivalent binary files to your OS)

File Contents

# Content
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
14 os << setcompressionlevel( Z_NO_COMPRESSION );
15 os << "hello, hello, hi, ho!" << endl;
16
17 setcompressionlevel( os, Z_DEFAULT_COMPRESSION )
18 << "I'm compressing again" << endl;
19
20 os.close();
21
22 return 0;
23
24 }