Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::IO::GzipInputStream Class Reference

This class is for deflating a gzip-compressed InputStream source. More...

#include <gzipstream.h>

Inheritance diagram for Inkscape::IO::GzipInputStream:
Inkscape::IO::BasicInputStream Inkscape::IO::InputStream

Public Member Functions

 GzipInputStream (InputStream &sourceStream)
 
 ~GzipInputStream () override
 
int available () override
 Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream.
 
void close () override
 Closes this input stream and releases any system resources associated with the stream.
 
int get () override
 Reads the next byte of data from the input stream.
 
- Public Member Functions inherited from Inkscape::IO::BasicInputStream
 BasicInputStream (InputStream &sourceStream)
 
 ~BasicInputStream () override=default
 
- Public Member Functions inherited from Inkscape::IO::InputStream
 InputStream ()=default
 Constructor.
 
virtual ~InputStream ()=default
 Destructor.
 

Private Member Functions

bool load ()
 
int fetchMore ()
 

Private Attributes

bool loaded
 
unsigned char * outputBuf
 
unsigned char * srcBuf
 
unsigned long crc
 
unsigned long srcCrc
 
unsigned long srcSiz
 
unsigned long srcLen
 
long outputBufPos
 
long outputBufLen
 
z_stream d_stream
 

Additional Inherited Members

- Protected Attributes inherited from Inkscape::IO::BasicInputStream
bool closed
 
InputStreamsource
 

Detailed Description

This class is for deflating a gzip-compressed InputStream source.

Definition at line 38 of file gzipstream.h.

Constructor & Destructor Documentation

◆ GzipInputStream()

Inkscape::IO::GzipInputStream::GzipInputStream ( InputStream sourceStream)

Definition at line 39 of file gzipstream.cpp.

References d_stream.

◆ ~GzipInputStream()

Inkscape::IO::GzipInputStream::~GzipInputStream ( )
override

Definition at line 57 of file gzipstream.cpp.

References close(), outputBuf, and srcBuf.

Member Function Documentation

◆ available()

int Inkscape::IO::GzipInputStream::available ( )
overridevirtual

Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream.

Reimplemented from Inkscape::IO::BasicInputStream.

Definition at line 75 of file gzipstream.cpp.

References Inkscape::IO::BasicInputStream::closed, outputBuf, outputBufLen, and outputBufPos.

◆ close()

void Inkscape::IO::GzipInputStream::close ( )
overridevirtual

Closes this input stream and releases any system resources associated with the stream.

Reimplemented from Inkscape::IO::BasicInputStream.

Definition at line 87 of file gzipstream.cpp.

References Inkscape::IO::BasicInputStream::closed, d_stream, outputBuf, and srcBuf.

Referenced by ~GzipInputStream().

◆ fetchMore()

int Inkscape::IO::GzipInputStream::fetchMore ( )
private

Definition at line 269 of file gzipstream.cpp.

References crc, d_stream, outputBuf, outputBufLen, and outputBufPos.

Referenced by get(), and load().

◆ get()

int Inkscape::IO::GzipInputStream::get ( )
overridevirtual

Reads the next byte of data from the input stream.

-1 if EOF

Reimplemented from Inkscape::IO::BasicInputStream.

Definition at line 111 of file gzipstream.cpp.

References Inkscape::IO::BasicInputStream::closed, fetchMore(), load(), loaded, outputBuf, outputBufLen, and outputBufPos.

Referenced by readOpenTypeSVGTable().

◆ load()

bool Inkscape::IO::GzipInputStream::load ( )
private

Member Data Documentation

◆ crc

unsigned long Inkscape::IO::GzipInputStream::crc
private

Definition at line 63 of file gzipstream.h.

Referenced by fetchMore(), and load().

◆ d_stream

z_stream Inkscape::IO::GzipInputStream::d_stream
private

Definition at line 70 of file gzipstream.h.

Referenced by close(), fetchMore(), GzipInputStream(), and load().

◆ loaded

bool Inkscape::IO::GzipInputStream::loaded
private

Definition at line 58 of file gzipstream.h.

Referenced by get().

◆ outputBuf

unsigned char* Inkscape::IO::GzipInputStream::outputBuf
private

Definition at line 60 of file gzipstream.h.

Referenced by available(), close(), fetchMore(), get(), load(), and ~GzipInputStream().

◆ outputBufLen

long Inkscape::IO::GzipInputStream::outputBufLen
private

Definition at line 68 of file gzipstream.h.

Referenced by available(), fetchMore(), get(), and load().

◆ outputBufPos

long Inkscape::IO::GzipInputStream::outputBufPos
private

Definition at line 67 of file gzipstream.h.

Referenced by available(), fetchMore(), and get().

◆ srcBuf

unsigned char* Inkscape::IO::GzipInputStream::srcBuf
private

Definition at line 61 of file gzipstream.h.

Referenced by close(), load(), and ~GzipInputStream().

◆ srcCrc

unsigned long Inkscape::IO::GzipInputStream::srcCrc
private

Definition at line 64 of file gzipstream.h.

Referenced by load().

◆ srcLen

unsigned long Inkscape::IO::GzipInputStream::srcLen
private

Definition at line 66 of file gzipstream.h.

Referenced by load().

◆ srcSiz

unsigned long Inkscape::IO::GzipInputStream::srcSiz
private

Definition at line 65 of file gzipstream.h.

Referenced by load().


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