Lines Matching refs:zs
115 inline int read(izstream& zs, T* x, Items items) { in read() argument
116 return ::gzread(zs.fp(), x, items*sizeof(T)); in read()
123 inline izstream& operator>(izstream& zs, T& x) {
124 ::gzread(zs.fp(), &x, sizeof(T));
125 return zs;
129 inline zstringlen::zstringlen(izstream& zs) { in zstringlen() argument
130 zs > val.byte; in zstringlen()
131 if (val.byte == 255) zs > val.word; in zstringlen()
138 inline izstream& operator>(izstream& zs, char* x) {
139 zstringlen len(zs);
140 ::gzread(zs.fp(), x, len.value());
142 return zs;
145 inline char* read_string(izstream& zs) { in read_string() argument
146 zstringlen len(zs); in read_string()
148 ::gzread(zs.fp(), x, len.value()); in read_string()
264 inline int write(ozstream& zs, const T* x, Items items) { in write() argument
265 return ::gzwrite(zs.fp(), (voidp) x, items*sizeof(T)); in write()
272 inline ozstream& operator<(ozstream& zs, const T& x) {
273 ::gzwrite(zs.fp(), (voidp) &x, sizeof(T));
274 return zs;
277 inline zstringlen::zstringlen(ozstream& zs, const char* x) { in zstringlen() argument
279 if (val.word < 255) zs < (val.byte = val.word); in zstringlen()
280 else zs < val; in zstringlen()
286 inline ozstream& operator<(ozstream& zs, const char* x) {
287 zstringlen len(zs, x);
288 ::gzwrite(zs.fp(), (voidp) x, len.value());
289 return zs;
293 inline ozstream& operator<(ozstream& zs, char* const& x) {
294 return zs < (const char*) x;
302 inline ostream& operator<<(ozstream& zs, const T& x) {
303 zs.os_flush();
304 return zs.os() << x;