27 #include <strstream.h>
35 # define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
37 # define SET_BINARY_MODE(file)
97 const char*
error(
int* errnum) {
114 template <
class T,
class Items>
141 x[
len.value()] =
'\0';
147 char*
x =
new char[
len.value()+1];
149 x[
len.value()] =
'\0';
178 char mode[4] =
"wb\0";
188 char mode[4] =
"wb\0";
237 if (
m_os == 0)
m_os =
new ostrstream;
243 ostrstream* oss =
new ostrstream;
244 oss->fill(
m_os->fill());
245 oss->flags(
m_os->flags());
246 oss->precision(
m_os->precision());
247 oss->width(
m_os->width());
263 template <
class T,
class Items>
294 return zs < (
const char*)
x;
const char * error(int *errnum)
izstream(const char *name)
void open(const char *name)
int read(void *buf, size_t len)
const char * error(int *errnum)
int write(const void *buf, size_t len)
void open(FILE *fp, int level=Z_DEFAULT_COMPRESSION)
ozstream(FILE *fp, int level=Z_DEFAULT_COMPRESSION)
void open(const char *name, int level=Z_DEFAULT_COMPRESSION)
ozstream(const char *name, int level=Z_DEFAULT_COMPRESSION)
struct zstringlen::Val val
zstringlen(class izstream &)
int ZEXPORT gzclose(gzFile file)
gzFile ZEXPORT gzopen(char *path, const char *mode) const
gzFile ZEXPORT gzdopen(int fd, const char *mode)
const char *ZEXPORT gzerror(gzFile file, int *errnum)
int ZEXPORT gzread(gzFile file, voidp buf, unsigned len)
int ZEXPORT gzflush(gzFile file, int flush)
int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len)
#define Z_DEFAULT_COMPRESSION
izstream & operator>(izstream &zs, T &x)
#define SET_BINARY_MODE(file)
int write(ozstream &zs, const T *x, Items items)
ostream & operator<<(ozstream &zs, const T &x)
ozstream & operator<(ozstream &zs, const T &x)
char * read_string(izstream &zs)
int read(izstream &zs, T *x, Items items)