]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/zipstrm.tex
corrected EVT_NOTIFY[_RANGE] docs (bug 1439078)
[wxWidgets.git] / docs / latex / wx / zipstrm.tex
CommitLineData
704a4b75 1%
00375592
VZ
2% automatically generated by HelpGen $Revision$ from
3% wx/zipstrm.h at 16/Sep/04 12:19:29
704a4b75
VS
4%
5
00375592 6\section{\class{wxZipClassFactory}}\label{wxzipclassfactory}
704a4b75 7
00375592
VZ
8Class factory for the zip archive format. See the base class
9for details.
704a4b75 10
00375592 11\wxheading{Derived from}
f6bcfd97 12
00375592 13\helpref{wxArchiveClassFactory}{wxarchiveclassfactory}
f6bcfd97 14
00375592
VZ
15\wxheading{Include files}
16
17<wx/zipstrm.h>
18
19\wxheading{See also}
20
21\helpref{Archive formats such as zip}{wxarc}\\
22\helpref{Generic archive programming}{wxarcgeneric}
23\helpref{wxZipEntry}{wxzipentry}\\
24\helpref{wxZipInputStream}{wxzipinputstream}\\
25\helpref{wxZipOutputStream}{wxzipoutputstream}
26
27
28%
29% automatically generated by HelpGen $Revision$ from
30% wx/zipstrm.h at 16/Sep/04 12:19:29
31%
32
33\section{\class{wxZipEntry}}\label{wxzipentry}
34
35Holds the meta-data for an entry in a zip.
f6bcfd97 36
704a4b75
VS
37\wxheading{Derived from}
38
00375592 39\helpref{wxArchiveEntry}{wxarchiveentry}
9704b250
VS
40
41\wxheading{Include files}
42
43<wx/zipstrm.h>
704a4b75 44
00375592
VZ
45\wxheading{Data structures}
46
47Constants for \helpref{Get/SetMethod}{wxzipentrymethod}:
48
49\begin{verbatim}
50// Compression Method, only 0 (store) and 8 (deflate) are supported here
51//
52enum wxZipMethod
53{
54 wxZIP_METHOD_STORE,
55 wxZIP_METHOD_SHRINK,
56 wxZIP_METHOD_REDUCE1,
57 wxZIP_METHOD_REDUCE2,
58 wxZIP_METHOD_REDUCE3,
59 wxZIP_METHOD_REDUCE4,
60 wxZIP_METHOD_IMPLODE,
61 wxZIP_METHOD_TOKENIZE,
62 wxZIP_METHOD_DEFLATE,
63 wxZIP_METHOD_DEFLATE64,
64 wxZIP_METHOD_BZIP2 = 12,
65 wxZIP_METHOD_DEFAULT = 0xffff
66};
67
68\end{verbatim}
69
70Constants for \helpref{Get/SetSystemMadeBy}{wxzipentrysystemmadeby}:
71
72\begin{verbatim}
73// Originating File-System.
74//
75// These are Pkware's values. Note that Info-zip disagree on some of them,
76// most notably NTFS.
77//
78enum wxZipSystem
79{
80 wxZIP_SYSTEM_MSDOS,
81 wxZIP_SYSTEM_AMIGA,
82 wxZIP_SYSTEM_OPENVMS,
83 wxZIP_SYSTEM_UNIX,
84 wxZIP_SYSTEM_VM_CMS,
85 wxZIP_SYSTEM_ATARI_ST,
86 wxZIP_SYSTEM_OS2_HPFS,
87 wxZIP_SYSTEM_MACINTOSH,
88 wxZIP_SYSTEM_Z_SYSTEM,
89 wxZIP_SYSTEM_CPM,
90 wxZIP_SYSTEM_WINDOWS_NTFS,
91 wxZIP_SYSTEM_MVS,
92 wxZIP_SYSTEM_VSE,
93 wxZIP_SYSTEM_ACORN_RISC,
94 wxZIP_SYSTEM_VFAT,
95 wxZIP_SYSTEM_ALTERNATE_MVS,
96 wxZIP_SYSTEM_BEOS,
97 wxZIP_SYSTEM_TANDEM,
98 wxZIP_SYSTEM_OS_400
99};
100
101\end{verbatim}
102
103Constants for \helpref{Get/SetExternalAttributes}{wxzipentryexternalattributes}:
104
105\begin{verbatim}
106// Dos/Win file attributes
107//
108enum wxZipAttributes
109{
110 wxZIP_A_RDONLY = 0x01,
111 wxZIP_A_HIDDEN = 0x02,
112 wxZIP_A_SYSTEM = 0x04,
113 wxZIP_A_SUBDIR = 0x10,
114 wxZIP_A_ARCH = 0x20,
115
116 wxZIP_A_MASK = 0x37
117};
118
119\end{verbatim}
120
121Constants for \helpref{Get/SetFlags}{wxzipentrygetflags}:
122
123\begin{verbatim}
124// Values for the flags field in the zip headers
125//
126enum wxZipFlags
127{
128 wxZIP_ENCRYPTED = 0x0001,
129 wxZIP_DEFLATE_NORMAL = 0x0000, // normal compression
130 wxZIP_DEFLATE_EXTRA = 0x0002, // extra compression
131 wxZIP_DEFLATE_FAST = 0x0004, // fast compression
132 wxZIP_DEFLATE_SUPERFAST = 0x0006, // superfast compression
133 wxZIP_DEFLATE_MASK = 0x0006,
134 wxZIP_SUMS_FOLLOW = 0x0008, // crc and sizes come after the data
135 wxZIP_ENHANCED = 0x0010,
136 wxZIP_PATCH = 0x0020,
137 wxZIP_STRONG_ENC = 0x0040,
138 wxZIP_UNUSED = 0x0F80,
139 wxZIP_RESERVED = 0xF000
140};
141
142\end{verbatim}
143
144\wxheading{See also}
145
146\helpref{Archive formats such as zip}{wxarc}\\
147\helpref{wxZipInputStream}{wxzipinputstream}\\
148\helpref{wxZipOutputStream}{wxzipoutputstream}\\
149\helpref{wxZipNotifier}{wxzipnotifier}
150
151\wxheading{Field availability}
152
153When reading a zip from a stream that is seekable,
154 \helpref{GetNextEntry()}{wxzipinputstreamgetnextentry} returns
155a fully populated wxZipEntry object except for
156 \helpref{wxZipEntry::GetLocalExtra()}{wxzipentrylocalextra}. GetLocalExtra()
157becomes available when the entry is opened, either by calling
158 \helpref{wxZipInputStream::OpenEntry}{wxzipinputstreamopenentry} or by
159making an attempt to read the entry's data.
160
161For zips on \helpref{non-seekable}{wxarcnoseek} streams, the following
162fields are always available when GetNextEntry() returns:
163
164\helpref{GetDateTime}{wxarchiveentrydatetime}\\
165\helpref{GetInternalFormat}{wxarchiveentrygetinternalformat}\\
166\helpref{GetInternalName}{wxzipentrygetinternalname}\\
167\helpref{GetFlags}{wxzipentrygetflags}\\
168\helpref{GetLocalExtra}{wxzipentrylocalextra}\\
169\helpref{GetMethod}{wxzipentrymethod}\\
170\helpref{GetName}{wxarchiveentryname}\\
171\helpref{GetOffset}{wxarchiveentrygetoffset}\\
172\helpref{IsDir}{wxarchiveentryisdir}
173
174The following fields are also usually available when GetNextEntry()
175returns, however, if the zip was also written to a non-seekable stream
176the zipper is permitted to store them after the entry's data. In that
177case they become available when the entry's data has been read to Eof(),
178or \helpref{CloseEntry()}{wxarchiveinputstreamcloseentry} has been called.
179{\tt (GetFlags() \& wxZIP\_SUMS\_FOLLOW) != 0} indicates that one or
180more of these come after the data:
181
182\helpref{GetCompressedSize}{wxzipentrygetcompressedsize}\\
183\helpref{GetCrc}{wxzipentrygetcrc}\\
184\helpref{GetSize}{wxarchiveentrysize}
185
186The following are stored at the end of the zip, and become available
187when the end of the zip has been reached, i.e. after GetNextEntry()
188returns NULL and Eof() is true:
189
190\helpref{GetComment}{wxzipentrycomment}\\
191\helpref{GetExternalAttributes}{wxzipentryexternalattributes}\\
192\helpref{GetExtra}{wxzipentryextra}\\
193\helpref{GetMode}{wxzipentrymode}\\
194\helpref{GetSystemMadeBy}{wxzipentrysystemmadeby}\\
195\helpref{IsReadOnly}{wxarchiveentryisreadonly}\\
196\helpref{IsMadeByUnix}{wxzipentryismadebyunix}\\
197\helpref{IsText}{wxzipentryistext}
198
199
704a4b75
VS
200\latexignore{\rtfignore{\wxheading{Members}}}
201
00375592
VZ
202
203\membersection{wxZipEntry::wxZipEntry}\label{wxzipentrywxzipentry}
204
205\func{}{wxZipEntry}{\param{const wxString\& }{name = wxEmptyString}, \param{const wxDateTime\& }{dt = wxDateTime::Now()}, \param{off\_t }{size = wxInvalidOffset}}
206
207Constructor.
208
209\func{}{wxZipEntry}{\param{const wxZipEntry\& }{entry}}
210
211Copy constructor.
212
213
214\membersection{wxZipEntry::Clone}\label{wxzipentryclone}
215
216\constfunc{wxZipEntry*}{Clone}{\void}
217
218Make a copy of this entry.
219
220
221\membersection{wxZipEntry::Get/SetComment}\label{wxzipentrycomment}
222
223\constfunc{wxString}{GetComment}{\void}
224
225\func{void}{SetComment}{\param{const wxString\& }{comment}}
226
227A short comment for this entry.
228
229
230\membersection{wxZipEntry::GetCompressedSize}\label{wxzipentrygetcompressedsize}
231
232\constfunc{off\_t}{GetCompressedSize}{\void}
233
234The compressed size of this entry in bytes.
235
236
237\membersection{wxZipEntry::GetCrc}\label{wxzipentrygetcrc}
238
239\constfunc{wxUint32}{GetCrc}{\void}
240
241CRC32 for this entry's data.
242
243
244\membersection{wxZipEntry::Get/SetExternalAttributes}\label{wxzipentryexternalattributes}
245
246\constfunc{wxUint32}{GetExternalAttributes}{\void}
247
248\func{void}{SetExternalAttributes}{\param{wxUint32 }{attr}}
249
250The low 8 bits are always the DOS/Windows file attributes for this entry.
251The values of these attributes are given in the
252enumeration {\tt wxZipAttributes}.
253
254The remaining bits can store platform specific permission bits or
255attributes, and their meaning depends on the value
256of \helpref{SetSystemMadeBy()}{wxzipentrysystemmadeby}.
257If \helpref{IsMadeByUnix()}{wxzipentryismadebyunix} is true then the
258high 16 bits are unix mode bits.
259
260The following other accessors access these bits:
261
262\helpref{IsReadOnly/SetIsReadOnly}{wxarchiveentryisreadonly}\\
263\helpref{IsDir/SetIsDir}{wxarchiveentryisdir}\\
264\helpref{Get/SetMode}{wxzipentrymode}
265
266
267\membersection{wxZipEntry::Get/SetExtra}\label{wxzipentryextra}
268
269\constfunc{const char*}{GetExtra}{\void}
270
271\constfunc{size\_t}{GetExtraLen}{\void}
272
273\func{void}{SetExtra}{\param{const char* }{extra}, \param{size\_t }{len}}
274
275The extra field from the entry's central directory record.
276
277The extra field is used to store platform or application specific
278data. See Pkware's document 'appnote.txt' for information on its format.
279
280
281\membersection{wxZipEntry::GetFlags}\label{wxzipentrygetflags}
282
283\constfunc{int}{GetFlags}{\void}
284
285Returns a combination of the bits flags in the enumeration {\tt wxZipFlags}.
286
287
288\membersection{wxZipEntry::GetInternalName}\label{wxzipentrygetinternalname}
289
290\constfunc{wxString}{GetInternalName}{\void}
291
292Returns the entry's filename in the internal format used within the
293archive. The name can include directory components, i.e. it can be a
294full path.
295
296The names of directory entries are returned without any trailing path
297separator. This gives a canonical name that can be used in comparisons.
298
299\func{wxString}{GetInternalName}{\param{const wxString\& }{name}, \param{wxPathFormat }{format = wxPATH\_NATIVE}, \param{bool* }{pIsDir = NULL}}
300
301A static member that translates a filename into the internal format used
302within the archive. If the third parameter is provided, the bool pointed
303to is set to indicate whether the name looks like a directory name
304(i.e. has a trailing path separator).
305
306\wxheading{See also}
307
308\helpref{Looking up an archive entry by name}{wxarcbyname}
309
310
311\membersection{wxZipEntry::Get/SetLocalExtra}\label{wxzipentrylocalextra}
312
313\constfunc{const char*}{GetLocalExtra}{\void}
314
315\constfunc{size\_t}{GetLocalExtraLen}{\void}
316
317\func{void}{SetLocalExtra}{\param{const char* }{extra}, \param{size\_t }{len}}
318
319The extra field from the entry's local record.
320
321The extra field is used to store platform or application specific
322data. See Pkware's document 'appnote.txt' for information on its format.
323
324
325\membersection{wxZipEntry::Get/SetMethod}\label{wxzipentrymethod}
326
327\constfunc{int}{GetMethod}{\void}
328
329\func{void}{SetMethod}{\param{int }{method}}
330
331The compression method. The enumeration {\tt wxZipMethod} lists the
332possible values.
333
334The default constructor sets this to wxZIP\_METHOD\_DEFAULT,
335which allows \helpref{wxZipOutputStream}{wxzipoutputstream} to
336choose the method when writing the entry.
337
338
339\membersection{wxZipEntry::Get/SetMode}\label{wxzipentrymode}
340
341\constfunc{int}{GetMode}{\void}
342
343If \helpref{IsMadeByUnix()}{wxzipentryismadebyunix} is true then
344returns the unix permission bits stored in
345 \helpref{GetExternalAttributes()}{wxzipentryexternalattributes}.
346Otherwise synthesises them from the DOS attributes.
347
348\func{void}{SetMode}{\param{int }{mode}}
349
350Sets the DOS attributes
351in \helpref{GetExternalAttributes()}{wxzipentryexternalattributes}
352to be consistent with the {\tt mode} given.
353
354If \helpref{IsMadeByUnix()}{wxzipentryismadebyunix} is true then also
355stores {\tt mode} in GetExternalAttributes().
356
357Note that the default constructor
358sets \helpref{GetSystemMadeBy()}{wxzipentrysystemmadeby} to
359wxZIP\_SYSTEM\_MSDOS by default. So to be able to store unix
360permissions when creating zips, call SetSystemMadeBy(wxZIP\_SYSTEM\_UNIX).
361
362
363\membersection{wxZipEntry::SetNotifier}\label{wxzipentrynotifier}
364
365\func{void}{SetNotifier}{\param{wxZipNotifier\& }{notifier}}
366
367\func{void}{UnsetNotifier}{\void}
368
369Sets the \helpref{notifier}{wxzipnotifier} for this entry.
370Whenever the \helpref{wxZipInputStream}{wxzipinputstream} updates
371this entry, it will then invoke the associated
372notifier's \helpref{OnEntryUpdated}{wxzipnotifieronentryupdated}
373method.
374
375Setting a notifier is not usually necessary. It is used to handle
376certain cases when modifying an zip in a pipeline (i.e. between
377non-seekable streams).
378
379\wxheading{See also}
380
381\helpref{Archives on non-seekable streams}{wxarcnoseek}\\
382\helpref{wxZipNotifier}{wxzipnotifier}
383
384
385\membersection{wxZipEntry::Get/SetSystemMadeBy}\label{wxzipentrysystemmadeby}
386
387\constfunc{int}{GetSystemMadeBy}{\void}
388
389\func{void}{SetSystemMadeBy}{\param{int }{system}}
390
391The originating file-system. The default constructor sets this to
392wxZIP\_SYSTEM\_MSDOS. Set it to wxZIP\_SYSTEM\_UNIX in order to be
393able to store unix permissions using \helpref{SetMode()}{wxzipentrymode}.
394
395
396\membersection{wxZipEntry::IsMadeByUnix}\label{wxzipentryismadebyunix}
397
398\constfunc{bool}{IsMadeByUnix}{\void}
399
400Returns true if \helpref{GetSystemMadeBy()}{wxzipentrysystemmadeby}
401is a flavour of unix.
402
403
404\membersection{wxZipEntry::IsText/SetIsText}\label{wxzipentryistext}
405
406\constfunc{bool}{IsText}{\void}
407
408\func{void}{SetIsText}{\param{bool }{isText = true}}
409
410Indicates that this entry's data is text in an 8-bit encoding.
411
412
413\membersection{wxZipEntry::operator=}\label{wxzipentryoperatorassign}
414
415\func{wxZipEntry\& operator}{operator=}{\param{const wxZipEntry\& }{entry}}
416
417Assignment operator.
418
419
420%
421% automatically generated by HelpGen $Revision$ from
422% wx/zipstrm.h at 16/Sep/04 12:19:29
423%
424
425\section{\class{wxZipInputStream}}\label{wxzipinputstream}
426
427Input stream for reading zip files.
428
429\helpref{GetNextEntry()}{wxzipinputstreamgetnextentry} returns an
430 \helpref{wxZipEntry}{wxzipentry} object containing the meta-data
431for the next entry in the zip (and gives away ownership). Reading from
432the wxZipInputStream then returns the entry's data. Eof() becomes true
433after an attempt has been made to read past the end of the entry's data.
434When there are no more entries, GetNextEntry() returns NULL and sets Eof().
435
df467a9d
MW
436Note that in general zip entries are not seekable, and
437wxZipInputStream::SeekI() always returns wxInvalidOffset.
438
00375592
VZ
439\wxheading{Derived from}
440
441\helpref{wxArchiveInputStream}{wxarchiveinputstream}
442
443\wxheading{Include files}
444
445<wx/zipstrm.h>
446
447\wxheading{Data structures}
46263455
VZ
448\begin{verbatim}
449typedef wxZipEntry entry_type
450\end{verbatim}
00375592
VZ
451
452\wxheading{See also}
453
454\helpref{Archive formats such as zip}{wxarc}\\
455\helpref{wxZipEntry}{wxzipentry}\\
456\helpref{wxZipOutputStream}{wxzipoutputstream}
457
458\latexignore{\rtfignore{\wxheading{Members}}}
459
460
704a4b75
VS
461\membersection{wxZipInputStream::wxZipInputStream}\label{wxzipinputstreamwxzipinputstream}
462
00375592
VZ
463\func{}{wxZipInputStream}{\param{wxInputStream\& }{stream}, \param{wxMBConv\& }{conv = wxConvLocal}}
464
465Constructor. In a Unicode build the second parameter {\tt conv} is
466used to translate the filename and comment fields into Unicode. It has
467no effect on the stream's data.
468
704a4b75
VS
469\func{}{wxZipInputStream}{\param{const wxString\& }{archive}, \param{const wxString\& }{file}}
470
00375592
VZ
471Compatibility constructor.
472
df467a9d
MW
473When this constructor is used, an emulation of seeking is
474switched on for compatibility with previous versions. Note however,
475that it is deprecated.
476
00375592
VZ
477
478\membersection{wxZipInputStream::CloseEntry}\label{wxzipinputstreamcloseentry}
479
480\func{bool}{CloseEntry}{\void}
481
482Closes the current entry. On a non-seekable stream reads to the end of
483the current entry first.
484
485
486\membersection{wxZipInputStream::GetComment}\label{wxzipinputstreamgetcomment}
487
488\func{wxString}{GetComment}{\void}
489
490Returns the zip comment.
491
43e8916f 492This is stored at the end of the zip, therefore when reading a zip
00375592
VZ
493from a non-seekable stream, it returns the empty string until the
494end of the zip has been reached, i.e. when GetNextEntry() returns
495NULL.
496
497
498\membersection{wxZipInputStream::GetNextEntry}\label{wxzipinputstreamgetnextentry}
499
500\func{wxZipEntry*}{GetNextEntry}{\void}
501
502Closes the current entry if one is open, then reads the meta-data for
503the next entry and returns it in a \helpref{wxZipEntry}{wxzipentry}
504object, giving away ownership. The stream is then open and can be read.
505
506
507\membersection{wxZipInputStream::GetTotalEntries}\label{wxzipinputstreamgettotalentries}
508
509\func{int}{GetTotalEntries}{\void}
510
511For a zip on a seekable stream returns the total number of entries in
512the zip. For zips on non-seekable streams returns the number of entries
513returned so far by \helpref{GetNextEntry()}{wxzipinputstreamgetnextentry}.
514
515
516\membersection{wxZipInputStream::OpenEntry}\label{wxzipinputstreamopenentry}
517
518\func{bool}{OpenEntry}{\param{wxZipEntry\& }{entry}}
519
520Closes the current entry if one is open, then opens the entry specified
521by the {\it entry} object.
522
523{\it entry} should be from the same zip file, and the zip should
524be on a seekable stream.
525
526\wxheading{See also}
527
528\helpref{Looking up an archive entry by name}{wxarcbyname}
529
530
531%
532% automatically generated by HelpGen $Revision$ from
533% wx/zipstrm.h at 16/Sep/04 12:19:29
534%
535
536\section{\class{wxZipNotifier}}\label{wxzipnotifier}
537
538If you need to know when a \helpref{wxZipInputStream}{wxzipinputstream}
539updates a \helpref{wxZipEntry}{wxzipentry},
540you can create a notifier by deriving from this abstract base class,
541overriding \helpref{OnEntryUpdated()}{wxzipnotifieronentryupdated}.
542An instance of your notifier class can then be assigned to wxZipEntry
543objects, using \helpref{wxZipEntry::SetNotifier()}{wxzipentrynotifier}.
544
545Setting a notifier is not usually necessary. It is used to handle
546certain cases when modifying an zip in a pipeline (i.e. between
547non-seekable streams).
548See '\helpref{Archives on non-seekable streams}{wxarcnoseek}'.
549
550\wxheading{Derived from}
551
552No base class
553
554\wxheading{Include files}
555
556<wx/zipstrm.h>
557
558\wxheading{See also}
559
560\helpref{Archives on non-seekable streams}{wxarcnoseek}\\
561\helpref{wxZipEntry}{wxzipentry}\\
562\helpref{wxZipInputStream}{wxzipinputstream}\\
563\helpref{wxZipOutputStream}{wxzipoutputstream}
564
565\latexignore{\rtfignore{\wxheading{Members}}}
566
567
568\membersection{wxZipNotifier::OnEntryUpdated}\label{wxzipnotifieronentryupdated}
569
570\func{void}{OnEntryUpdated}{\param{wxZipEntry\& }{entry}}
571
572Override this to receive notifications when
573an \helpref{wxZipEntry}{wxzipentry} object changes.
574
575
576%
577% automatically generated by HelpGen $Revision$ from
578% wx/zipstrm.h at 16/Sep/04 12:19:29
579%
580
581\section{\class{wxZipOutputStream}}\label{wxzipoutputstream}
582
583Output stream for writing zip files.
584
585\helpref{PutNextEntry()}{wxzipoutputstreamputnextentry} is used to create
586a new entry in the output zip, then the entry's data is written to the
587wxZipOutputStream. Another call to PutNextEntry() closes the current
588entry and begins the next.
589
590\wxheading{Derived from}
591
592\helpref{wxArchiveOutputStream}{wxarchiveoutputstream}
593
594\wxheading{Include files}
595
596<wx/zipstrm.h>
597
598\wxheading{See also}
599
600\helpref{Archive formats such as zip}{wxarc}\\
601\helpref{wxZipEntry}{wxzipentry}\\
602\helpref{wxZipInputStream}{wxzipinputstream}
603
604\latexignore{\rtfignore{\wxheading{Members}}}
605
606
607\membersection{wxZipOutputStream::wxZipOutputStream}\label{wxzipoutputstreamwxzipoutputstream}
608
609\func{}{wxZipOutputStream}{\param{wxOutputStream\& }{stream}, \param{int }{level = -1}, \param{wxMBConv\& }{conv = wxConvLocal}}
610
611Constructor. {\tt level} is the compression level to use.
612It can be a value between 0 and 9 or -1 to use the default value
613which currently is equivalent to 6.
614
615In a Unicode build the third parameter {\tt conv} is used to translate
616the filename and comment fields to Unicode. It has no effect on the
617stream's data.
618
619
620\membersection{wxZipOutputStream::\destruct{wxZipOutputStream}}\label{wxzipoutputstreamdtor}
621
622\func{}{\destruct{wxZipOutputStream}}{\void}
623
624The destructor calls \helpref{Close()}{wxzipoutputstreamclose} to finish
625writing the zip if it has not been called already.
626
627
628\membersection{wxZipOutputStream::Close}\label{wxzipoutputstreamclose}
629
630\func{bool}{Close}{\void}
631
632Finishes writing the zip, returning true if successfully.
633Called by the destructor if not called explicitly.
634
635
636\membersection{wxZipOutputStream::CloseEntry}\label{wxzipoutputstreamcloseentry}
637
638\func{bool}{CloseEntry}{\void}
639
640Close the current entry. It is called implicitly whenever another new
641entry is created with \helpref{CopyEntry()}{wxzipoutputstreamcopyentry}
642or \helpref{PutNextEntry()}{wxzipoutputstreamputnextentry}, or
643when the zip is closed.
644
645
646\membersection{wxZipOutputStream::CopyArchiveMetaData}\label{wxzipoutputstreamcopyarchivemetadata}
647
648\func{bool}{CopyArchiveMetaData}{\param{wxZipInputStream\& }{inputStream}}
649
650Transfers the zip comment from the \helpref{wxZipInputStream}{wxzipinputstream}
651to this output stream.
652
653
654\membersection{wxZipOutputStream::CopyEntry}\label{wxzipoutputstreamcopyentry}
655
656\func{bool}{CopyEntry}{\param{wxZipEntry* }{entry}, \param{wxZipInputStream\& }{inputStream}}
657
658Takes ownership of {\tt entry} and uses it to create a new entry
659in the zip. {\tt entry} is then opened in {\tt inputStream} and its contents
660copied to this stream.
661
662CopyEntry() is much more efficient than transferring the data using
663Read() and Write() since it will copy them without decompressing and
664recompressing them.
665
666For zips on seekable streams, {\tt entry} must be from the same zip file
667as {\tt stream}. For non-seekable streams, {\tt entry} must also be the
668last thing read from {\tt inputStream}.
669
670
671\membersection{wxZipOutputStream::Get/SetLevel}\label{wxzipoutputstreamlevel}
672
673\constfunc{int}{GetLevel}{\void}
674
675\func{void}{SetLevel}{\param{int }{level}}
676
677Set the compression level that will be used the next time an entry is
678created. It can be a value between 0 and 9 or -1 to use the default value
679which currently is equivalent to 6.
680
681
682\membersection{wxZipOutputStream::PutNextDirEntry}\label{wxzipoutputstreamputnextdirentry}
683
684\func{bool}{PutNextDirEntry}{\param{const wxString\& }{name}, \param{const wxDateTime\& }{dt = wxDateTime::Now()}}
685
686Create a new directory entry
687(see \helpref{wxArchiveEntry::IsDir()}{wxarchiveentryisdir})
688with the given name and timestamp.
689
690\helpref{PutNextEntry()}{wxzipoutputstreamputnextentry} can
691also be used to create directory entries, by supplying a name with
692a trailing path separator.
693
694
695\membersection{wxZipOutputStream::PutNextEntry}\label{wxzipoutputstreamputnextentry}
696
697\func{bool}{PutNextEntry}{\param{wxZipEntry* }{entry}}
698
699Takes ownership of {\tt entry} and uses it to create a new entry
700in the zip.
701
702\func{bool}{PutNextEntry}{\param{const wxString\& }{name}, \param{const wxDateTime\& }{dt = wxDateTime::Now()}, \param{off\_t }{size = wxInvalidOffset}}
703
704Create a new entry with the given name, timestamp and size.
705
704a4b75 706
00375592 707\membersection{wxZipOutputStream::SetComment}\label{wxzipoutputstreamsetcomment}
704a4b75 708
00375592 709\func{void}{SetComment}{\param{const wxString\& }{comment}}
704a4b75 710
00375592
VZ
711Sets a comment for the zip as a whole. It is written at the end of the
712zip.
704a4b75 713