Rizin
unix-like reverse engineering framework and cli tools
zstream_test.cpp File Reference
#include "zstream.h"
#include <math.h>
#include <stdlib.h>
#include <iomanip.h>

Go to the source code of this file.

Functions

void main ()
 

Function Documentation

◆ main()

void main ( void  )

Definition at line 6 of file zstream_test.cpp.

6  {
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 }
const lzma_allocator const uint8_t * in
Definition: block.h:527
const lzma_allocator const uint8_t size_t uint8_t * out
Definition: block.h:528
struct @667 g
int x
Definition: mipsasm.c:20
#define h(i)
Definition: sha256.c:48
char * read_string(izstream &zs)
Definition: zstream.h:145

References g, h, in, out, read_string(), and x.