input_gunzip Class Reference

#include <gunzip.h>

Inheritance diagram for input_gunzip:

input_ty

Public Member Functions

virtual ~input_gunzip ()
 input_gunzip (input &deeper)
nstring name ()
long length ()
void keepalive ()
long read_inner (void *data, size_t nbytes)
long ftell_inner ()
bool is_remote () const

Static Public Member Functions

static bool candidate (input &deeper)

Private Member Functions

void zlib_fatal_error (int err)
long getLong ()
void read_header ()
 input_gunzip ()
 input_gunzip (const input_gunzip &arg)
input_gunzipoperator= (const input_gunzip &arg)

Private Attributes

input deeper
z_stream stream
bool z_eof
uLong crc
long pos
Byte * buf
nstring filename

Detailed Description

The input_gunzip class is used to represent an input stream which is uncompressed on the fly.

Definition at line 31 of file gunzip.h.


Constructor & Destructor Documentation

virtual input_gunzip::~input_gunzip (  )  [virtual]

The destructor.

input_gunzip::input_gunzip ( input deeper  ) 

The constructor.

Parameters:
deeper The deeper input which this filter reads from.

input_gunzip::input_gunzip (  )  [private]

The default constructor.

input_gunzip::input_gunzip ( const input_gunzip arg  )  [private]

The copy constructor.


Member Function Documentation

nstring input_gunzip::name (  )  [virtual]

The name method is used to determine the name of the input.

Implements input_ty.

long input_gunzip::length (  )  [virtual]

The length method is used to determine the length of the input. May return -1 if the length is unknown.

Implements input_ty.

void input_gunzip::keepalive (  )  [virtual]

The keepalive method is used to set the SO_KEEPALIVE socket option, if the file is a socket. Does nothing otherwise.

Reimplemented from input_ty.

long input_gunzip::read_inner ( void *  data,
size_t  nbytes 
) [virtual]

The read_inner method is used to read unbuffered data from the given input stream. At most nbytes bytes will be read into data. The number of bytes actually read will be returned. At end-of-file, a value <= 0 will be returned, and data will be unchanged. All file read errors or format errors are fatal, and will cause the method to not return.

Parameters:
data Where to put the results of the read.
nbytes The maximum number of bytes to read.
Returns:
The actual number of bytes read, or zero for end-of-file.

Implements input_ty.

long input_gunzip::ftell_inner (  )  [virtual]

The ftell_inner method is used to determine the unbuffered current position within the input.

Implements input_ty.

bool input_gunzip::is_remote (  )  const [virtual]

The is_remote method is used to determine whether or not an input stream is from a local file or a remote source. This is only intended to be a generally informative thing, to provide information to the user, it isn't (and can't be) utterly precise.

Reimplemented from input_ty.

static bool input_gunzip::candidate ( input deeper  )  [static]

The candidate class method is used to check the magi number of a gzipped file. All of the bytes read are unread before this method returns.

void input_gunzip::zlib_fatal_error ( int  err  )  [private]

long input_gunzip::getLong (  )  [private]

void input_gunzip::read_header (  )  [private]

input_gunzip& input_gunzip::operator= ( const input_gunzip arg  )  [private]

The assignment operator.


Field Documentation

The deeper instance variable is used to remember the deeper input which this filter reads from.

Definition at line 78 of file gunzip.h.

z_stream input_gunzip::stream [private]

Definition at line 80 of file gunzip.h.

bool input_gunzip::z_eof [private]

Definition at line 81 of file gunzip.h.

uLong input_gunzip::crc [private]

Definition at line 82 of file gunzip.h.

long input_gunzip::pos [private]

Definition at line 83 of file gunzip.h.

Byte* input_gunzip::buf [private]

Definition at line 84 of file gunzip.h.

Definition at line 85 of file gunzip.h.


The documentation for this class was generated from the following file:

Generated on Wed Mar 12 23:37:40 2008 for Aegis by  doxygen 1.5.5