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]
zstream_test.cpp
Go to the documentation of this file.
1 #include "zstream.h"
2 #include <math.h>
3 #include <stdlib.h>
4 #include <iomanip.h>
5 
6 void main() {
7  char h[256] = "Hello";
8  char* g = "Goodbye";
9  ozstream out("temp.gz");
10  out < "This works well" < h < g;
11  out.close();
12 
13  izstream in("temp.gz"); // read it back
14  char *x = read_string(in), *y = new char[256], z[256];
15  in > y > z;
16  in.close();
17  cout << x << endl << y << endl << z << endl;
18 
19  out.open("temp.gz"); // try ascii output; zcat temp.gz to see the results
20  out << setw(50) << setfill('#') << setprecision(20) << x << endl << y << endl << z << endl;
21  out << z << endl << y << endl << x << endl;
22  out << 1.1234567890123456789 << endl;
23 
24  delete[] x; delete[] y;
25 }
void open(const char *name, int level=Z_DEFAULT_COMPRESSION)
Definition: zstream.h:177
GLint GLint GLint GLint GLint GLint y
GLfloat GLfloat GLfloat GLfloat h
GLint GLint GLint GLint GLint x
GLdouble GLdouble z
int close()
Definition: zstream.h:198
local int out(void *out_desc, unsigned char *buf, unsigned len)
Definition: gun.c:131
GLuint in
char * read_string(izstream &zs)
Definition: zstream.h:145
GLboolean GLboolean g
void main()
Definition: zstream_test.cpp:6
int close()
Definition: zstream.h:80