~ubuntu-branches/ubuntu/feisty/clamav/feisty

« back to all changes in this revision

Viewing changes to win32/3rdparty/zlib/contrib/iostream/test.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-02-20 10:33:44 UTC
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20070220103344-zgcu2psnx9d98fpa
Tags: upstream-0.90
ImportĀ upstreamĀ versionĀ 0.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
}