Regina Calculation Engine
Public Member Functions | List of all members
regina::DecompressionStream Class Reference

An input stream that decompresses data as it is read. More...

#include <utilities/zstream.h>

Inheritance diagram for regina::DecompressionStream:

Public Member Functions

 DecompressionStream ()
 Creates a new decompression stream. More...
 
 DecompressionStream (const char *path)
 Creates a new decompression stream that reads from the given file. More...
 
int open (const char *path)
 Opens the given file for decompressed reading. More...
 
int close ()
 Closes the underlying file. More...
 

Detailed Description

An input stream that decompresses data as it is read.

The standard zlib compression library is used.

This stream does its work through a DecompressionBuffer.

Python:
Not present.

Constructor & Destructor Documentation

regina::DecompressionStream::DecompressionStream ( )
inline

Creates a new decompression stream.

regina::DecompressionStream::DecompressionStream ( const char *  path)
inline

Creates a new decompression stream that reads from the given file.

The underlying file will be opened automatically.

Internationalisation:
This routine makes no assumptions about the character encoding used in the given file name, and simply passes it through unchanged to low-level C/C++ file I/O routines.
Parameters
paththe pathname of the new file to open.

Member Function Documentation

int regina::DecompressionStream::close ( )
inline

Closes the underlying file.

If no file is open, this routine does nothing.

Returns
0 on success, or ZBuffer::zEOF on error.
int regina::DecompressionStream::open ( const char *  path)
inline

Opens the given file for decompressed reading.

If a file is already open, it will be closed before the new file is opened.

Internationalisation:
This routine makes no assumptions about the character encoding used in the given file name, and simply passes it through unchanged to low-level C/C++ file I/O routines.
Parameters
paththe pathname of the new file to open.
Returns
0 on success, or ZBuffer::zEOF on error.

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

Copyright © 1999-2014, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@debian.org).