grpc
third_party
zlib
contrib
iostream2
zlib/contrib/iostream2/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
}
gen_build_yaml.out
dictionary out
Definition:
src/benchmark/gen_build_yaml.py:24
y
const double y
Definition:
bloaty/third_party/googletest/googlemock/test/gmock-matchers_test.cc:3611
izstream
Definition:
bloaty/third_party/zlib/contrib/iostream2/zstream.h:51
main
void main()
Definition:
zlib/contrib/iostream2/zstream_test.cpp:6
z
Uncopyable z
Definition:
bloaty/third_party/googletest/googlemock/test/gmock-matchers_test.cc:3612
read_string
char * read_string(izstream &zs)
Definition:
bloaty/third_party/zlib/contrib/iostream2/zstream.h:145
in
const char * in
Definition:
third_party/abseil-cpp/absl/strings/internal/str_format/parser_test.cc:391
ozstream
Definition:
bloaty/third_party/zlib/contrib/iostream2/zstream.h:155
zstream.h
x
int x
Definition:
bloaty/third_party/googletest/googlemock/test/gmock-matchers_test.cc:3610
g
struct @717 g
grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:01