Aegis  4.25.D505
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
input_bunzip2 Class Reference

#include <bunzip2.h>

Inheritance diagram for input_bunzip2:
input_ty

Public Member Functions

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

Static Public Member Functions

static bool candidate (input &deeper)

Private Types

enum  { BUFFER_SIZE = 1 << 14 }

Private Member Functions

void bzlib_fatal_error (int err)
 input_bunzip2 ()
 input_bunzip2 (const input_bunzip2 &arg)
input_bunzip2operator= (const input_bunzip2 &arg)

Private Attributes

input deeper
bz_stream stream
bool end_of_file
off_t pos
char * buf
nstring filename

Detailed Description

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

Definition at line 31 of file bunzip2.h.


Member Enumeration Documentation

anonymous enum [private]
Enumerator:
BUFFER_SIZE 

Definition at line 80 of file bunzip2.h.


Constructor & Destructor Documentation

virtual input_bunzip2::~input_bunzip2 ( ) [virtual]

The destructor.

The constructor.

Parameters:
deeperThe deeper input which this filter reads from.

The default constructor.

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

The copy constructor.


Member Function Documentation

void input_bunzip2::bzlib_fatal_error ( int  err) [private]

The bzlib_fatal_error method is used to report fatal error from the bunzip2 engine.

Parameters:
errThe error code returned by a deeper bzlib function.
Note:
This method does not return.
static bool input_bunzip2::candidate ( input deeper) [static]

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

off_t input_bunzip2::ftell_inner ( ) [virtual]

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

Implements input_ty.

bool input_bunzip2::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.

void input_bunzip2::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.

off_t input_bunzip2::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.

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

Implements input_ty.

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

The assignment operator.

ssize_t input_bunzip2::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:
dataWhere to put the results of the read.
nbytesThe maximum number of bytes to read.
Returns:
The actual number of bytes read, or zero for end-of-file.

Implements input_ty.


Field Documentation

char* input_bunzip2::buf [private]

Definition at line 85 of file bunzip2.h.

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

Definition at line 78 of file bunzip2.h.

Definition at line 83 of file bunzip2.h.

Definition at line 86 of file bunzip2.h.

off_t input_bunzip2::pos [private]

Definition at line 84 of file bunzip2.h.

bz_stream input_bunzip2::stream [private]

Definition at line 82 of file bunzip2.h.


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