zfstream.cpp revision 1b33c96954667ba382fa595baf7b31290bfdd517
#include "zfstream.h"
mode(0),
{ }
sync();
if ( own_file_descriptor )
close();
}
int io_mode ) {
if ( is_open() )
return NULL;
char char_mode[10];
char *p = char_mode;
*p++ = 'r';
*p++ = 'a';
} else {
*p++ = 'w';
}
*p++ = 'b';
}
// Hard code the compression level
*p++ = '9';
}
// Put the end-of-string indicator
*p = '\0';
return NULL;
own_file_descriptor = 1;
return this;
}
int io_mode ) {
if ( is_open() )
return NULL;
char char_mode[10];
char *p = char_mode;
*p++ = 'r';
*p++ = 'a';
} else {
*p++ = 'w';
}
*p++ = 'b';
}
// Hard code the compression level
*p++ = '9';
}
// Put the end-of-string indicator
*p = '\0';
return NULL;
own_file_descriptor = 0;
return this;
}
if ( is_open() ) {
sync();
}
return this;
}
}
}
}
// If the file hasn't been opened for reading, error.
return EOF;
// if a buffer doesn't exists, allocate one.
if ( !base() ) {
return EOF;
setp(0,0);
} else {
if ( in_avail() )
return (unsigned char) *gptr();
if ( out_waiting() ) {
return EOF;
}
}
// Attempt to fill the buffer.
// disable get area
setg(0,0,0);
return EOF;
}
return (unsigned char) *gptr();
}
return EOF;
if ( !base() ) {
return EOF;
setg(0,0,0);
} else {
if (in_avail()) {
return EOF;
}
if (out_waiting()) {
return EOF;
}
}
if ( c != EOF ) {
*pptr() = c;
pbump(1);
}
return 0;
}
if ( !is_open() )
return EOF;
if ( out_waiting() )
return flushbuf();
return 0;
}
int n;
char *q;
q = pbase();
n = pptr() - q;
return EOF;
setp(0,0);
return 0;
}
int required;
char *p;
p = base();
if ( t <= 0) return EOF;
return t;
}
{ }
{ }
else
clear();
}
else
clear();
}
void gzfilestream_common::close() {
}
{
return &buffer;
}
gzifstream::gzifstream() :
{
}
{
}
{
}
gzifstream::~gzifstream() { }
gzofstream::gzofstream() :
{
}
{
}
{
}
gzofstream::~gzofstream() { }