metaforce/hecl-gui/quazip/doc/html/classQuaGzipFile.html

293 lines
16 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>QuaZIP: QuaGzipFile Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">QuaZIP&#160;<span id="projectnumber">quazip-0-6-2</span></div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="dirs.html"><span>Directories</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> </div>
<div class="headertitle">
<div class="title">QuaGzipFile Class Reference</div> </div>
</div>
<div class="contents">
<!-- doxytag: class="QuaGzipFile" -->
<p>GZIP file.
<a href="classQuaGzipFile.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="quagzipfile_8h_source.html">quagzipfile.h</a>&gt;</code></p>
<p><a href="classQuaGzipFile-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaGzipFile.html#a709608207b41ca81d5beed2b34982809">QuaGzipFile</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Empty constructor. <a href="#a709608207b41ca81d5beed2b34982809"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaGzipFile.html#a13996f5db660c4a29645f8d208b9ca6b">QuaGzipFile</a> (QObject *parent)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Empty constructor with a parent. <a href="#a13996f5db660c4a29645f8d208b9ca6b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaGzipFile.html#ac7f7703bda9c6169c001aa15641bb2ea">QuaGzipFile</a> (const QString &amp;fileName, QObject *parent=NULL)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <a href="#ac7f7703bda9c6169c001aa15641bb2ea"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1200bc76f36bb2e1991e1e0467befbf2"></a><!-- doxytag: member="QuaGzipFile::~QuaGzipFile" ref="a1200bc76f36bb2e1991e1e0467befbf2" args="()" -->
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaGzipFile.html#a1200bc76f36bb2e1991e1e0467befbf2">~QuaGzipFile</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a253fbaf410a3d4ae0a719505c5525149"></a><!-- doxytag: member="QuaGzipFile::setFileName" ref="a253fbaf410a3d4ae0a719505c5525149" args="(const QString &amp;fileName)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaGzipFile.html#a253fbaf410a3d4ae0a719505c5525149">setFileName</a> (const QString &amp;fileName)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the name of the GZIP file to be opened. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9a0954a1db1fcf2aeba0530239bce71c"></a><!-- doxytag: member="QuaGzipFile::getFileName" ref="a9a0954a1db1fcf2aeba0530239bce71c" args="() const " -->
QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaGzipFile.html#a9a0954a1db1fcf2aeba0530239bce71c">getFileName</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the name of the GZIP file. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaGzipFile.html#ae97f4e15d86c965c156df33d00318176">isSequential</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true. <a href="#ae97f4e15d86c965c156df33d00318176"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaGzipFile.html#a1d560babdfff3a3441d704099a5bc1e4">open</a> (QIODevice::OpenMode mode)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens the file. <a href="#a1d560babdfff3a3441d704099a5bc1e4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaGzipFile.html#adf5a954bb9bfda2d33cd336a213e2549">open</a> (int fd, QIODevice::OpenMode mode)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens the file. <a href="#adf5a954bb9bfda2d33cd336a213e2549"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaGzipFile.html#ab745f345b727c81abbc3eb5af4dca844">flush</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Flushes data to file. <a href="#ab745f345b727c81abbc3eb5af4dca844"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a273205350b1235a242a1eb5cbf586434"></a><!-- doxytag: member="QuaGzipFile::close" ref="a273205350b1235a242a1eb5cbf586434" args="()" -->
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaGzipFile.html#a273205350b1235a242a1eb5cbf586434">close</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Closes the file. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9eab41b46367e63e0c269c42ca883d82"></a><!-- doxytag: member="QuaGzipFile::readData" ref="a9eab41b46367e63e0c269c42ca883d82" args="(char *data, qint64 maxSize)" -->
virtual qint64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaGzipFile.html#a9eab41b46367e63e0c269c42ca883d82">readData</a> (char *data, qint64 maxSize)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Implementation of QIODevice::readData(). <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6dd09d41d8a51c96b0f2134eff37f676"></a><!-- doxytag: member="QuaGzipFile::writeData" ref="a6dd09d41d8a51c96b0f2134eff37f676" args="(const char *data, qint64 maxSize)" -->
virtual qint64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaGzipFile.html#a6dd09d41d8a51c96b0f2134eff37f676">writeData</a> (const char *data, qint64 maxSize)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Implementation of QIODevice::writeData(). <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>GZIP file. </p>
<p>This class is a wrapper around GZIP file access functions in zlib. Unlike <a class="el" href="classQuaZip.html" title="ZIP archive.">QuaZip</a> classes, it doesn't allow reading from a GZIP file opened as QIODevice, for example, if your GZIP file is in QBuffer. It only provides QIODevice access to a GZIP file contents, but the GZIP file itself must be identified by its name on disk or by descriptor id. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a709608207b41ca81d5beed2b34982809"></a><!-- doxytag: member="QuaGzipFile::QuaGzipFile" ref="a709608207b41ca81d5beed2b34982809" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">QuaGzipFile::QuaGzipFile </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Empty constructor. </p>
<p>Must call <a class="el" href="classQuaGzipFile.html#a253fbaf410a3d4ae0a719505c5525149" title="Sets the name of the GZIP file to be opened.">setFileName()</a> before trying to open. </p>
</div>
</div>
<a class="anchor" id="a13996f5db660c4a29645f8d208b9ca6b"></a><!-- doxytag: member="QuaGzipFile::QuaGzipFile" ref="a13996f5db660c4a29645f8d208b9ca6b" args="(QObject *parent)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">QuaGzipFile::QuaGzipFile </td>
<td>(</td>
<td class="paramtype">QObject *&#160;</td>
<td class="paramname"><em>parent</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Empty constructor with a parent. </p>
<p>Must call <a class="el" href="classQuaGzipFile.html#a253fbaf410a3d4ae0a719505c5525149" title="Sets the name of the GZIP file to be opened.">setFileName()</a> before trying to open. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">parent</td><td>The parent object, as per QObject logic. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ac7f7703bda9c6169c001aa15641bb2ea"></a><!-- doxytag: member="QuaGzipFile::QuaGzipFile" ref="ac7f7703bda9c6169c001aa15641bb2ea" args="(const QString &amp;fileName, QObject *parent=NULL)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">QuaGzipFile::QuaGzipFile </td>
<td>(</td>
<td class="paramtype">const QString &amp;&#160;</td>
<td class="paramname"><em>fileName</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">QObject *&#160;</td>
<td class="paramname"><em>parent</em> = <code>NULL</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Constructor. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">fileName</td><td>The name of the GZIP file. </td></tr>
<tr><td class="paramname">parent</td><td>The parent object, as per QObject logic. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ae97f4e15d86c965c156df33d00318176"></a><!-- doxytag: member="QuaGzipFile::isSequential" ref="ae97f4e15d86c965c156df33d00318176" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool QuaGzipFile::isSequential </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns true. </p>
<p>Strictly speaking, zlib supports seeking for GZIP files, but it is poorly implemented, because there is no way to implement it properly. For reading, seeking backwards is very slow, and for writing, it is downright impossible. Therefore, <a class="el" href="classQuaGzipFile.html" title="GZIP file.">QuaGzipFile</a> does not support seeking at all. </p>
</div>
</div>
<a class="anchor" id="a1d560babdfff3a3441d704099a5bc1e4"></a><!-- doxytag: member="QuaGzipFile::open" ref="a1d560babdfff3a3441d704099a5bc1e4" args="(QIODevice::OpenMode mode)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool QuaGzipFile::open </td>
<td>(</td>
<td class="paramtype">QIODevice::OpenMode&#160;</td>
<td class="paramname"><em>mode</em></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Opens the file. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">mode</td><td>Can be either QIODevice::Write or QIODevice::Read. ReadWrite and Append aren't supported. </td></tr>
</table>
</dd>
</dl>
<p>Referenced by <a class="el" href="classQuaGzipFile.html#adf5a954bb9bfda2d33cd336a213e2549">open()</a>.</p>
</div>
</div>
<a class="anchor" id="adf5a954bb9bfda2d33cd336a213e2549"></a><!-- doxytag: member="QuaGzipFile::open" ref="adf5a954bb9bfda2d33cd336a213e2549" args="(int fd, QIODevice::OpenMode mode)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool QuaGzipFile::open </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>fd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">QIODevice::OpenMode&#160;</td>
<td class="paramname"><em>mode</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Opens the file. </p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">fd</td><td>The file descriptor to read/write the GZIP file from/to. </td></tr>
<tr><td class="paramname">mode</td><td>Can be either QIODevice::Write or QIODevice::Read. ReadWrite and Append aren't supported. </td></tr>
</table>
</dd>
</dl>
<p>References <a class="el" href="classQuaGzipFile.html#a1d560babdfff3a3441d704099a5bc1e4">open()</a>.</p>
</div>
</div>
<a class="anchor" id="ab745f345b727c81abbc3eb5af4dca844"></a><!-- doxytag: member="QuaGzipFile::flush" ref="ab745f345b727c81abbc3eb5af4dca844" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool QuaGzipFile::flush </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Flushes data to file. </p>
<p>The data is written using Z_SYNC_FLUSH mode. Doesn't make any sense when reading. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>quazip/<a class="el" href="quagzipfile_8h_source.html">quagzipfile.h</a></li>
<li>quazip/quagzipfile.cpp</li>
</ul>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Feb 9 2014 20:17:04 for QuaZIP by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>