w1146869587
2022-03-04 2efb30bdc5c62273d77443180aba586f64c097f9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
\section{QuaGzipFile Class Reference}
\label{classQuaGzipFile}\index{QuaGzipFile@{QuaGzipFile}}
 
 
GZIP file.  
 
 
 
 
{\ttfamily \#include $<$quagzipfile.h$>$}
 
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bf QuaGzipFile} ()
\begin{DoxyCompactList}\small\item\em Empty constructor. \end{DoxyCompactList}\item 
{\bf QuaGzipFile} (QObject $\ast$parent)
\begin{DoxyCompactList}\small\item\em Empty constructor with a parent. \end{DoxyCompactList}\item 
{\bf QuaGzipFile} (const QString \&fileName, QObject $\ast$parent=NULL)
\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item 
virtual {\bf $\sim$QuaGzipFile} ()\label{classQuaGzipFile_a1200bc76f36bb2e1991e1e0467befbf2}
 
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
void {\bf setFileName} (const QString \&fileName)\label{classQuaGzipFile_a253fbaf410a3d4ae0a719505c5525149}
 
\begin{DoxyCompactList}\small\item\em Sets the name of the GZIP file to be opened. \end{DoxyCompactList}\item 
QString {\bf getFileName} () const \label{classQuaGzipFile_a9a0954a1db1fcf2aeba0530239bce71c}
 
\begin{DoxyCompactList}\small\item\em Returns the name of the GZIP file. \end{DoxyCompactList}\item 
virtual bool {\bf isSequential} () const 
\begin{DoxyCompactList}\small\item\em Returns true. \end{DoxyCompactList}\item 
virtual bool {\bf open} (QIODevice::OpenMode mode)
\begin{DoxyCompactList}\small\item\em Opens the file. \end{DoxyCompactList}\item 
virtual bool {\bf open} (int fd, QIODevice::OpenMode mode)
\begin{DoxyCompactList}\small\item\em Opens the file. \end{DoxyCompactList}\item 
virtual bool {\bf flush} ()
\begin{DoxyCompactList}\small\item\em Flushes data to file. \end{DoxyCompactList}\item 
virtual void {\bf close} ()\label{classQuaGzipFile_a273205350b1235a242a1eb5cbf586434}
 
\begin{DoxyCompactList}\small\item\em Closes the file. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual qint64 {\bf readData} (char $\ast$data, qint64 maxSize)\label{classQuaGzipFile_a9eab41b46367e63e0c269c42ca883d82}
 
\begin{DoxyCompactList}\small\item\em Implementation of QIODevice::readData(). \end{DoxyCompactList}\item 
virtual qint64 {\bf writeData} (const char $\ast$data, qint64 maxSize)\label{classQuaGzipFile_a6dd09d41d8a51c96b0f2134eff37f676}
 
\begin{DoxyCompactList}\small\item\em Implementation of QIODevice::writeData(). \end{DoxyCompactList}\end{DoxyCompactItemize}
 
 
\subsection{Detailed Description}
GZIP file. 
 
This class is a wrapper around GZIP file access functions in zlib. Unlike \doxyref{QuaZip}{p.}{classQuaZip} 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. 
 
\subsection{Constructor \& Destructor Documentation}
\index{QuaGzipFile@{QuaGzipFile}!QuaGzipFile@{QuaGzipFile}}
\index{QuaGzipFile@{QuaGzipFile}!QuaGzipFile@{QuaGzipFile}}
\subsubsection[{QuaGzipFile}]{\setlength{\rightskip}{0pt plus 5cm}QuaGzipFile::QuaGzipFile (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{classQuaGzipFile_a709608207b41ca81d5beed2b34982809}
 
 
Empty constructor. 
 
Must call \doxyref{setFileName()}{p.}{classQuaGzipFile_a253fbaf410a3d4ae0a719505c5525149} before trying to open. \index{QuaGzipFile@{QuaGzipFile}!QuaGzipFile@{QuaGzipFile}}
\index{QuaGzipFile@{QuaGzipFile}!QuaGzipFile@{QuaGzipFile}}
\subsubsection[{QuaGzipFile}]{\setlength{\rightskip}{0pt plus 5cm}QuaGzipFile::QuaGzipFile (
\begin{DoxyParamCaption}
\item[{QObject $\ast$}]{parent}
\end{DoxyParamCaption}
)}\label{classQuaGzipFile_a13996f5db660c4a29645f8d208b9ca6b}
 
 
Empty constructor with a parent. 
 
Must call \doxyref{setFileName()}{p.}{classQuaGzipFile_a253fbaf410a3d4ae0a719505c5525149} before trying to open. 
\begin{DoxyParams}{Parameters}
{\em parent} & The parent object, as per QObject logic. \\
\hline
\end{DoxyParams}
\index{QuaGzipFile@{QuaGzipFile}!QuaGzipFile@{QuaGzipFile}}
\index{QuaGzipFile@{QuaGzipFile}!QuaGzipFile@{QuaGzipFile}}
\subsubsection[{QuaGzipFile}]{\setlength{\rightskip}{0pt plus 5cm}QuaGzipFile::QuaGzipFile (
\begin{DoxyParamCaption}
\item[{const QString \&}]{fileName, }
\item[{QObject $\ast$}]{parent = {\ttfamily NULL}}
\end{DoxyParamCaption}
)}\label{classQuaGzipFile_ac7f7703bda9c6169c001aa15641bb2ea}
 
 
Constructor. 
 
 
\begin{DoxyParams}{Parameters}
{\em fileName} & The name of the GZIP file. \\
\hline
{\em parent} & The parent object, as per QObject logic. \\
\hline
\end{DoxyParams}
 
 
\subsection{Member Function Documentation}
\index{QuaGzipFile@{QuaGzipFile}!isSequential@{isSequential}}
\index{isSequential@{isSequential}!QuaGzipFile@{QuaGzipFile}}
\subsubsection[{isSequential}]{\setlength{\rightskip}{0pt plus 5cm}bool QuaGzipFile::isSequential (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  [virtual]}}\label{classQuaGzipFile_ae97f4e15d86c965c156df33d00318176}
 
 
Returns true. 
 
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, \doxyref{QuaGzipFile}{p.}{classQuaGzipFile} does not support seeking at all. \index{QuaGzipFile@{QuaGzipFile}!open@{open}}
\index{open@{open}!QuaGzipFile@{QuaGzipFile}}
\subsubsection[{open}]{\setlength{\rightskip}{0pt plus 5cm}bool QuaGzipFile::open (
\begin{DoxyParamCaption}
\item[{QIODevice::OpenMode}]{mode}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [virtual]}}\label{classQuaGzipFile_a1d560babdfff3a3441d704099a5bc1e4}
 
 
Opens the file. 
 
 
\begin{DoxyParams}{Parameters}
{\em mode} & Can be either QIODevice::Write or QIODevice::Read. ReadWrite and Append aren't supported. \\
\hline
\end{DoxyParams}
 
 
Referenced by open().
 
\index{QuaGzipFile@{QuaGzipFile}!open@{open}}
\index{open@{open}!QuaGzipFile@{QuaGzipFile}}
\subsubsection[{open}]{\setlength{\rightskip}{0pt plus 5cm}bool QuaGzipFile::open (
\begin{DoxyParamCaption}
\item[{int}]{fd, }
\item[{QIODevice::OpenMode}]{mode}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [virtual]}}\label{classQuaGzipFile_adf5a954bb9bfda2d33cd336a213e2549}
 
 
Opens the file. 
 
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
\begin{DoxyParams}{Parameters}
{\em fd} & The file descriptor to read/write the GZIP file from/to. \\
\hline
{\em mode} & Can be either QIODevice::Write or QIODevice::Read. ReadWrite and Append aren't supported. \\
\hline
\end{DoxyParams}
 
 
References open().
 
\index{QuaGzipFile@{QuaGzipFile}!flush@{flush}}
\index{flush@{flush}!QuaGzipFile@{QuaGzipFile}}
\subsubsection[{flush}]{\setlength{\rightskip}{0pt plus 5cm}bool QuaGzipFile::flush (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  [virtual]}}\label{classQuaGzipFile_ab745f345b727c81abbc3eb5af4dca844}
 
 
Flushes data to file. 
 
The data is written using Z\_\-SYNC\_\-FLUSH mode. Doesn't make any sense when reading. 
 
The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
quazip/quagzipfile.h\item 
quazip/quagzipfile.cpp\end{DoxyCompactItemize}