2 % automatically generated by HelpGen $Revision$ from
3 % wx/zipstrm.h at 16/Sep/04 12:19:29
6 \section{\class{wxZipClassFactory
}}\label{wxzipclassfactory
}
8 Class factory for the zip archive format. See the base class
11 \wxheading{Derived from
}
13 \helpref{wxArchiveClassFactory
}{wxarchiveclassfactory
}\\
14 \helpref{wxObject
}{wxobject
}
16 \wxheading{Include files
}
22 \helpref{wxBase
}{librarieslist
}
26 \helpref{Archive formats such as zip
}{wxarc
}\\
27 \helpref{Generic archive programming
}{wxarcgeneric
}\\
28 \helpref{wxZipEntry
}{wxzipentry
}\\
29 \helpref{wxZipInputStream
}{wxzipinputstream
}\\
30 \helpref{wxZipOutputStream
}{wxzipoutputstream
}
34 % automatically generated by HelpGen $Revision$ from
35 % wx/zipstrm.h at 16/Sep/04 12:19:29
38 \section{\class{wxZipEntry
}}\label{wxzipentry
}
40 Holds the meta-data for an entry in a zip.
42 \wxheading{Derived from
}
44 \helpref{wxArchiveEntry
}{wxarchiveentry
}\\
45 \helpref{wxObject
}{wxobject
}
47 \wxheading{Include files
}
53 \helpref{wxBase
}{librarieslist
}
55 \wxheading{Data structures
}
57 Constants for
\helpref{Get/SetMethod
}{wxzipentrymethod
}:
60 // Compression Method, only
0 (store) and
8 (deflate) are supported here
71 wxZIP_METHOD_TOKENIZE,
73 wxZIP_METHOD_DEFLATE64,
74 wxZIP_METHOD_BZIP2 =
12,
75 wxZIP_METHOD_DEFAULT =
0xffff
80 Constants for
\helpref{Get/SetSystemMadeBy
}{wxzipentrysystemmadeby
}:
83 // Originating File-System.
85 // These are Pkware's values. Note that Info-zip disagree on some of them,
95 wxZIP_SYSTEM_ATARI_ST,
96 wxZIP_SYSTEM_OS2_HPFS,
97 wxZIP_SYSTEM_MACINTOSH,
98 wxZIP_SYSTEM_Z_SYSTEM,
100 wxZIP_SYSTEM_WINDOWS_NTFS,
103 wxZIP_SYSTEM_ACORN_RISC,
105 wxZIP_SYSTEM_ALTERNATE_MVS,
113 Constants for
\helpref{Get/SetExternalAttributes
}{wxzipentryexternalattributes
}:
116 // Dos/Win file attributes
120 wxZIP_A_RDONLY =
0x01,
121 wxZIP_A_HIDDEN =
0x02,
122 wxZIP_A_SYSTEM =
0x04,
123 wxZIP_A_SUBDIR =
0x10,
131 Constants for
\helpref{Get/SetFlags
}{wxzipentrygetflags
}:
134 // Values for the flags field in the zip headers
138 wxZIP_ENCRYPTED =
0x0001,
139 wxZIP_DEFLATE_NORMAL =
0x0000, // normal compression
140 wxZIP_DEFLATE_EXTRA =
0x0002, // extra compression
141 wxZIP_DEFLATE_FAST =
0x0004, // fast compression
142 wxZIP_DEFLATE_SUPERFAST =
0x0006, // superfast compression
143 wxZIP_DEFLATE_MASK =
0x0006,
144 wxZIP_SUMS_FOLLOW =
0x0008, // crc and sizes come after the data
145 wxZIP_ENHANCED =
0x0010,
146 wxZIP_PATCH =
0x0020,
147 wxZIP_STRONG_ENC =
0x0040,
148 wxZIP_UNUSED =
0x0F80,
149 wxZIP_RESERVED =
0xF000
156 \helpref{Archive formats such as zip
}{wxarc
}\\
157 \helpref{wxZipInputStream
}{wxzipinputstream
}\\
158 \helpref{wxZipOutputStream
}{wxzipoutputstream
}\\
159 \helpref{wxZipNotifier
}{wxzipnotifier
}
161 \wxheading{Field availability
}
163 When reading a zip from a stream that is seekable,
164 \helpref{GetNextEntry()
}{wxzipinputstreamgetnextentry
} returns
165 a fully populated wxZipEntry object except for
166 \helpref{wxZipEntry::GetLocalExtra()
}{wxzipentrylocalextra
}. GetLocalExtra()
167 becomes available when the entry is opened, either by calling
168 \helpref{wxZipInputStream::OpenEntry
}{wxzipinputstreamopenentry
} or by
169 making an attempt to read the entry's data.
171 For zips on
\helpref{non-seekable
}{wxarcnoseek
} streams, the following
172 fields are always available when GetNextEntry() returns:
174 \helpref{GetDateTime
}{wxarchiveentrydatetime
}\\
175 \helpref{GetInternalFormat
}{wxarchiveentrygetinternalformat
}\\
176 \helpref{GetInternalName
}{wxzipentrygetinternalname
}\\
177 \helpref{GetFlags
}{wxzipentrygetflags
}\\
178 \helpref{GetLocalExtra
}{wxzipentrylocalextra
}\\
179 \helpref{GetMethod
}{wxzipentrymethod
}\\
180 \helpref{GetName
}{wxarchiveentryname
}\\
181 \helpref{GetOffset
}{wxarchiveentrygetoffset
}\\
182 \helpref{IsDir
}{wxarchiveentryisdir
}
184 The following fields are also usually available when GetNextEntry()
185 returns, however, if the zip was also written to a non-seekable stream
186 the zipper is permitted to store them after the entry's data. In that
187 case they become available when the entry's data has been read to Eof(),
188 or
\helpref{CloseEntry()
}{wxarchiveinputstreamcloseentry
} has been called.
189 {\tt (GetFlags() \& wxZIP
\_SUMS\_FOLLOW) !=
0} indicates that one or
190 more of these come after the data:
192 \helpref{GetCompressedSize
}{wxzipentrygetcompressedsize
}\\
193 \helpref{GetCrc
}{wxzipentrygetcrc
}\\
194 \helpref{GetSize
}{wxarchiveentrysize
}
196 The following are stored at the end of the zip, and become available
197 when the end of the zip has been reached, i.e. after GetNextEntry()
198 returns NULL and Eof() is true:
200 \helpref{GetComment
}{wxzipentrycomment
}\\
201 \helpref{GetExternalAttributes
}{wxzipentryexternalattributes
}\\
202 \helpref{GetExtra
}{wxzipentryextra
}\\
203 \helpref{GetMode
}{wxzipentrymode
}\\
204 \helpref{GetSystemMadeBy
}{wxzipentrysystemmadeby
}\\
205 \helpref{IsReadOnly
}{wxarchiveentryisreadonly
}\\
206 \helpref{IsMadeByUnix
}{wxzipentryismadebyunix
}\\
207 \helpref{IsText
}{wxzipentryistext
}
210 \latexignore{\rtfignore{\wxheading{Members
}}}
213 \membersection{wxZipEntry::wxZipEntry
}\label{wxzipentrywxzipentry
}
215 \func{}{wxZipEntry
}{\param{const wxString\&
}{name = wxEmptyString
},
\param{const wxDateTime\&
}{dt = wxDateTime::Now()
},
\param{off
\_t }{size = wxInvalidOffset
}}
219 \func{}{wxZipEntry
}{\param{const wxZipEntry\&
}{entry
}}
224 \membersection{wxZipEntry::Clone
}\label{wxzipentryclone
}
226 \constfunc{wxZipEntry*
}{Clone
}{\void}
228 Make a copy of this entry.
231 \membersection{wxZipEntry::Get/SetComment
}\label{wxzipentrycomment
}
233 \constfunc{wxString
}{GetComment
}{\void}
235 \func{void
}{SetComment
}{\param{const wxString\&
}{comment
}}
237 A short comment for this entry.
240 \membersection{wxZipEntry::GetCompressedSize
}\label{wxzipentrygetcompressedsize
}
242 \constfunc{off
\_t}{GetCompressedSize
}{\void}
244 The compressed size of this entry in bytes.
247 \membersection{wxZipEntry::GetCrc
}\label{wxzipentrygetcrc
}
249 \constfunc{wxUint32
}{GetCrc
}{\void}
251 CRC32 for this entry's data.
254 \membersection{wxZipEntry::Get/SetExternalAttributes
}\label{wxzipentryexternalattributes
}
256 \constfunc{wxUint32
}{GetExternalAttributes
}{\void}
258 \func{void
}{SetExternalAttributes
}{\param{wxUint32
}{attr
}}
260 The low
8 bits are always the DOS/Windows file attributes for this entry.
261 The values of these attributes are given in the
262 enumeration
{\tt wxZipAttributes
}.
264 The remaining bits can store platform specific permission bits or
265 attributes, and their meaning depends on the value
266 of
\helpref{SetSystemMadeBy()
}{wxzipentrysystemmadeby
}.
267 If
\helpref{IsMadeByUnix()
}{wxzipentryismadebyunix
} is true then the
268 high
16 bits are unix mode bits.
270 The following other accessors access these bits:
272 \helpref{IsReadOnly/SetIsReadOnly
}{wxarchiveentryisreadonly
}\\
273 \helpref{IsDir/SetIsDir
}{wxarchiveentryisdir
}\\
274 \helpref{Get/SetMode
}{wxzipentrymode
}
277 \membersection{wxZipEntry::Get/SetExtra
}\label{wxzipentryextra
}
279 \constfunc{const char*
}{GetExtra
}{\void}
281 \constfunc{size
\_t}{GetExtraLen
}{\void}
283 \func{void
}{SetExtra
}{\param{const char*
}{extra
},
\param{size
\_t }{len
}}
285 The extra field from the entry's central directory record.
287 The extra field is used to store platform or application specific
288 data. See Pkware's
document 'appnote.txt' for information on its format.
291 \membersection{wxZipEntry::GetFlags
}\label{wxzipentrygetflags
}
293 \constfunc{int
}{GetFlags
}{\void}
295 Returns a combination of the bits flags in the enumeration
{\tt wxZipFlags
}.
298 \membersection{wxZipEntry::GetInternalName
}\label{wxzipentrygetinternalname
}
300 \constfunc{wxString
}{GetInternalName
}{\void}
302 Returns the entry's filename in the internal format used within the
303 archive. The name can include directory components, i.e. it can be a
306 The names of directory entries are returned without any trailing path
307 separator. This gives a canonical name that can be used in comparisons.
309 \func{wxString
}{GetInternalName
}{\param{const wxString\&
}{name
},
\param{wxPathFormat
}{format = wxPATH
\_NATIVE},
\param{bool*
}{pIsDir = NULL
}}
311 A static member that translates a filename into the internal format used
312 within the archive. If the third parameter is provided, the bool pointed
313 to is set to indicate whether the name looks like a directory name
314 (i.e. has a trailing path separator).
318 \helpref{Looking up an archive entry by name
}{wxarcbyname
}
321 \membersection{wxZipEntry::Get/SetLocalExtra
}\label{wxzipentrylocalextra
}
323 \constfunc{const char*
}{GetLocalExtra
}{\void}
325 \constfunc{size
\_t}{GetLocalExtraLen
}{\void}
327 \func{void
}{SetLocalExtra
}{\param{const char*
}{extra
},
\param{size
\_t }{len
}}
329 The extra field from the entry's local record.
331 The extra field is used to store platform or application specific
332 data. See Pkware's
document 'appnote.txt' for information on its format.
335 \membersection{wxZipEntry::Get/SetMethod
}\label{wxzipentrymethod
}
337 \constfunc{int
}{GetMethod
}{\void}
339 \func{void
}{SetMethod
}{\param{int
}{method
}}
341 The compression method. The enumeration
{\tt wxZipMethod
} lists the
344 The default constructor sets this to wxZIP
\_METHOD\_DEFAULT,
345 which allows
\helpref{wxZipOutputStream
}{wxzipoutputstream
} to
346 choose the method when writing the entry.
349 \membersection{wxZipEntry::Get/SetMode
}\label{wxzipentrymode
}
351 \constfunc{int
}{GetMode
}{\void}
353 If
\helpref{IsMadeByUnix()
}{wxzipentryismadebyunix
} is true then
354 returns the unix permission bits stored in
355 \helpref{GetExternalAttributes()
}{wxzipentryexternalattributes
}.
356 Otherwise synthesises them from the DOS attributes.
358 \func{void
}{SetMode
}{\param{int
}{mode
}}
360 Sets the DOS attributes
361 in
\helpref{GetExternalAttributes()
}{wxzipentryexternalattributes
}
362 to be consistent with the
{\tt mode
} given.
364 If
\helpref{IsMadeByUnix()
}{wxzipentryismadebyunix
} is true then also
365 stores
{\tt mode
} in GetExternalAttributes().
367 Note that the default constructor
368 sets
\helpref{GetSystemMadeBy()
}{wxzipentrysystemmadeby
} to
369 wxZIP
\_SYSTEM\_MSDOS by default. So to be able to store unix
370 permissions when creating zips, call SetSystemMadeBy(wxZIP
\_SYSTEM\_UNIX).
373 \membersection{wxZipEntry::SetNotifier
}\label{wxzipentrynotifier
}
375 \func{void
}{SetNotifier
}{\param{wxZipNotifier\&
}{notifier
}}
377 \func{void
}{UnsetNotifier
}{\void}
379 Sets the
\helpref{notifier
}{wxzipnotifier
} for this entry.
380 Whenever the
\helpref{wxZipInputStream
}{wxzipinputstream
} updates
381 this entry, it will then invoke the associated
382 notifier's
\helpref{OnEntryUpdated
}{wxzipnotifieronentryupdated
}
385 Setting a notifier is not usually necessary. It is used to handle
386 certain cases when modifying an zip in a pipeline (i.e. between
387 non-seekable streams).
391 \helpref{Archives on non-seekable streams
}{wxarcnoseek
}\\
392 \helpref{wxZipNotifier
}{wxzipnotifier
}
395 \membersection{wxZipEntry::Get/SetSystemMadeBy
}\label{wxzipentrysystemmadeby
}
397 \constfunc{int
}{GetSystemMadeBy
}{\void}
399 \func{void
}{SetSystemMadeBy
}{\param{int
}{system
}}
401 The originating file-system. The default constructor sets this to
402 wxZIP
\_SYSTEM\_MSDOS. Set it to wxZIP
\_SYSTEM\_UNIX in order to be
403 able to store unix permissions using
\helpref{SetMode()
}{wxzipentrymode
}.
406 \membersection{wxZipEntry::IsMadeByUnix
}\label{wxzipentryismadebyunix
}
408 \constfunc{bool
}{IsMadeByUnix
}{\void}
410 Returns true if
\helpref{GetSystemMadeBy()
}{wxzipentrysystemmadeby
}
411 is a flavour of unix.
414 \membersection{wxZipEntry::IsText/SetIsText
}\label{wxzipentryistext
}
416 \constfunc{bool
}{IsText
}{\void}
418 \func{void
}{SetIsText
}{\param{bool
}{isText = true
}}
420 Indicates that this entry's data is text in an
8-bit encoding.
423 \membersection{wxZipEntry::operator=
}\label{wxzipentryoperatorassign
}
425 \func{wxZipEntry\& operator
}{operator=
}{\param{const wxZipEntry\&
}{entry
}}
431 % automatically generated by HelpGen $Revision$ from
432 % wx/zipstrm.h at 16/Sep/04 12:19:29
435 \section{\class{wxZipInputStream
}}\label{wxzipinputstream
}
437 Input stream for reading zip files.
439 \helpref{GetNextEntry()
}{wxzipinputstreamgetnextentry
} returns an
440 \helpref{wxZipEntry
}{wxzipentry
} object containing the meta-data
441 for the next entry in the zip (and gives away ownership). Reading from
442 the wxZipInputStream then returns the entry's data. Eof() becomes true
443 after an attempt has been made to read past the end of the entry's data.
444 When there are no more entries, GetNextEntry() returns NULL and sets Eof().
446 Note that in general zip entries are not seekable, and
447 wxZipInputStream::SeekI() always returns wxInvalidOffset.
449 \wxheading{Derived from
}
451 \helpref{wxArchiveInputStream
}{wxarchiveinputstream
}\\
452 \helpref{wxFilterInputStream
}{wxfilterinputstream
}\\
453 \helpref{wxInputStream
}{wxinputstream
}\\
454 \helpref{wxStreamBase
}{wxstreambase
}
456 \wxheading{Include files
}
462 \helpref{wxBase
}{librarieslist
}
464 \wxheading{Data structures
}
466 typedef wxZipEntry entry_type
471 \helpref{Archive formats such as zip
}{wxarc
}\\
472 \helpref{wxZipEntry
}{wxzipentry
}\\
473 \helpref{wxZipOutputStream
}{wxzipoutputstream
}
475 \latexignore{\rtfignore{\wxheading{Members
}}}
478 \membersection{wxZipInputStream::wxZipInputStream
}\label{wxzipinputstreamwxzipinputstream
}
480 \func{}{wxZipInputStream
}{\param{wxInputStream\&
}{stream
},
\param{wxMBConv\&
}{conv = wxConvLocal
}}
482 \func{}{wxZipInputStream
}{\param{wxInputStream*
}{stream
},
\param{wxMBConv\&
}{conv = wxConvLocal
}}
484 Constructor. In a Unicode build the second parameter
{\tt conv
} is
485 used to translate the filename and comment fields into Unicode. It has
486 no effect on the stream's data.
488 If the parent stream is passed as a pointer then the new filter stream
489 takes ownership of it. If it is passed by reference then it does not.
491 \func{}{wxZipInputStream
}{\param{const wxString\&
}{archive
},
\param{const wxString\&
}{file
}}
493 Compatibility constructor (requires WXWIN
\_COMPATIBILITY\_2\_6).
495 When this constructor is used, an emulation of seeking is
496 switched on for compatibility with previous versions. Note however,
497 that it is deprecated.
500 \membersection{wxZipInputStream::CloseEntry
}\label{wxzipinputstreamcloseentry
}
502 \func{bool
}{CloseEntry
}{\void}
504 Closes the current entry. On a non-seekable stream reads to the end of
505 the current entry first.
508 \membersection{wxZipInputStream::GetComment
}\label{wxzipinputstreamgetcomment
}
510 \func{wxString
}{GetComment
}{\void}
512 Returns the zip comment.
514 This is stored at the end of the zip, therefore when reading a zip
515 from a non-seekable stream, it returns the empty string until the
516 end of the zip has been reached, i.e. when GetNextEntry() returns
520 \membersection{wxZipInputStream::GetNextEntry
}\label{wxzipinputstreamgetnextentry
}
522 \func{wxZipEntry*
}{GetNextEntry
}{\void}
524 Closes the current entry if one is open, then reads the meta-data for
525 the next entry and returns it in a
\helpref{wxZipEntry
}{wxzipentry
}
526 object, giving away ownership. The stream is then open and can be read.
529 \membersection{wxZipInputStream::GetTotalEntries
}\label{wxzipinputstreamgettotalentries
}
531 \func{int
}{GetTotalEntries
}{\void}
533 For a zip on a seekable stream returns the total number of entries in
534 the zip. For zips on non-seekable streams returns the number of entries
535 returned so far by
\helpref{GetNextEntry()
}{wxzipinputstreamgetnextentry
}.
538 \membersection{wxZipInputStream::OpenEntry
}\label{wxzipinputstreamopenentry
}
540 \func{bool
}{OpenEntry
}{\param{wxZipEntry\&
}{entry
}}
542 Closes the current entry if one is open, then opens the entry specified
543 by the
{\it entry
} object.
545 {\it entry
} should be from the same zip file, and the zip should
546 be on a seekable stream.
550 \helpref{Looking up an archive entry by name
}{wxarcbyname
}
554 % automatically generated by HelpGen $Revision$ from
555 % wx/zipstrm.h at 16/Sep/04 12:19:29
558 \section{\class{wxZipNotifier
}}\label{wxzipnotifier
}
560 If you need to know when a
\helpref{wxZipInputStream
}{wxzipinputstream
}
561 updates a
\helpref{wxZipEntry
}{wxzipentry
},
562 you can create a notifier by deriving from this abstract base class,
563 overriding
\helpref{OnEntryUpdated()
}{wxzipnotifieronentryupdated
}.
564 An instance of your notifier class can then be assigned to wxZipEntry
565 objects, using
\helpref{wxZipEntry::SetNotifier()
}{wxzipentrynotifier
}.
567 Setting a notifier is not usually necessary. It is used to handle
568 certain cases when modifying an zip in a pipeline (i.e. between
569 non-seekable streams).
570 See '
\helpref{Archives on non-seekable streams
}{wxarcnoseek
}'.
572 \wxheading{Derived from
}
576 \wxheading{Include files
}
582 \helpref{wxBase
}{librarieslist
}
586 \helpref{Archives on non-seekable streams
}{wxarcnoseek
}\\
587 \helpref{wxZipEntry
}{wxzipentry
}\\
588 \helpref{wxZipInputStream
}{wxzipinputstream
}\\
589 \helpref{wxZipOutputStream
}{wxzipoutputstream
}
591 \latexignore{\rtfignore{\wxheading{Members
}}}
594 \membersection{wxZipNotifier::OnEntryUpdated
}\label{wxzipnotifieronentryupdated
}
596 \func{void
}{OnEntryUpdated
}{\param{wxZipEntry\&
}{entry
}}
598 Override this to receive notifications when
599 an
\helpref{wxZipEntry
}{wxzipentry
} object changes.
603 % automatically generated by HelpGen $Revision$ from
604 % wx/zipstrm.h at 16/Sep/04 12:19:29
607 \section{\class{wxZipOutputStream
}}\label{wxzipoutputstream
}
609 Output stream for writing zip files.
611 \helpref{PutNextEntry()
}{wxzipoutputstreamputnextentry
} is used to create
612 a new entry in the output zip, then the entry's data is written to the
613 wxZipOutputStream. Another call to PutNextEntry() closes the current
614 entry and begins the next.
616 \wxheading{Derived from
}
618 \helpref{wxArchiveOutputStream
}{wxarchiveoutputstream
}\\
619 \helpref{wxFilterOutputStream
}{wxfilteroutputstream
}\\
620 \helpref{wxOutputStream
}{wxoutputstream
}\\
621 \helpref{wxStreamBase
}{wxstreambase
}
623 \wxheading{Include files
}
629 \helpref{wxBase
}{librarieslist
}
633 \helpref{Archive formats such as zip
}{wxarc
}\\
634 \helpref{wxZipEntry
}{wxzipentry
}\\
635 \helpref{wxZipInputStream
}{wxzipinputstream
}
637 \latexignore{\rtfignore{\wxheading{Members
}}}
640 \membersection{wxZipOutputStream::wxZipOutputStream
}\label{wxzipoutputstreamwxzipoutputstream
}
642 \func{}{wxZipOutputStream
}{\param{wxOutputStream\&
}{stream
},
\param{int
}{level = -
1},
\param{wxMBConv\&
}{conv = wxConvLocal
}}
644 \func{}{wxZipOutputStream
}{\param{wxOutputStream*
}{stream
},
\param{int
}{level = -
1},
\param{wxMBConv\&
}{conv = wxConvLocal
}}
646 Constructor.
{\tt level
} is the compression level to use.
647 It can be a value between
0 and
9 or -
1 to use the default value
648 which currently is equivalent to
6.
650 If the parent stream is passed as a pointer then the new filter stream
651 takes ownership of it. If it is passed by reference then it does not.
653 In a Unicode build the third parameter
{\tt conv
} is used to translate
654 the filename and comment fields to an
8-bit encoding. It has no effect on the
658 \membersection{wxZipOutputStream::
\destruct{wxZipOutputStream
}}\label{wxzipoutputstreamdtor
}
660 \func{}{\destruct{wxZipOutputStream
}}{\void}
662 The destructor calls
\helpref{Close()
}{wxzipoutputstreamclose
} to finish
663 writing the zip if it has not been called already.
666 \membersection{wxZipOutputStream::Close
}\label{wxzipoutputstreamclose
}
668 \func{bool
}{Close
}{\void}
670 Finishes writing the zip, returning true if successful.
671 Called by the destructor if not called explicitly.
674 \membersection{wxZipOutputStream::CloseEntry
}\label{wxzipoutputstreamcloseentry
}
676 \func{bool
}{CloseEntry
}{\void}
678 Close the current entry. It is called implicitly whenever another new
679 entry is created with
\helpref{CopyEntry()
}{wxzipoutputstreamcopyentry
}
680 or
\helpref{PutNextEntry()
}{wxzipoutputstreamputnextentry
}, or
681 when the zip is closed.
684 \membersection{wxZipOutputStream::CopyArchiveMetaData
}\label{wxzipoutputstreamcopyarchivemetadata
}
686 \func{bool
}{CopyArchiveMetaData
}{\param{wxZipInputStream\&
}{inputStream
}}
688 Transfers the zip comment from the
\helpref{wxZipInputStream
}{wxzipinputstream
}
689 to this output stream.
692 \membersection{wxZipOutputStream::CopyEntry
}\label{wxzipoutputstreamcopyentry
}
694 \func{bool
}{CopyEntry
}{\param{wxZipEntry*
}{entry
},
\param{wxZipInputStream\&
}{inputStream
}}
696 Takes ownership of
{\tt entry
} and uses it to create a new entry
697 in the zip.
{\tt entry
} is then opened in
{\tt inputStream
} and its contents
698 copied to this stream.
700 CopyEntry() is much more efficient than transferring the data using
701 Read() and Write() since it will copy them without decompressing and
704 For zips on seekable streams,
{\tt entry
} must be from the same zip file
705 as
{\tt stream
}. For non-seekable streams,
{\tt entry
} must also be the
706 last thing read from
{\tt inputStream
}.
709 \membersection{wxZipOutputStream::Get/SetLevel
}\label{wxzipoutputstreamlevel
}
711 \constfunc{int
}{GetLevel
}{\void}
713 \func{void
}{SetLevel
}{\param{int
}{level
}}
715 Set the compression level that will be used the next time an entry is
716 created. It can be a value between
0 and
9 or -
1 to use the default value
717 which currently is equivalent to
6.
720 \membersection{wxZipOutputStream::PutNextDirEntry
}\label{wxzipoutputstreamputnextdirentry
}
722 \func{bool
}{PutNextDirEntry
}{\param{const wxString\&
}{name
},
\param{const wxDateTime\&
}{dt = wxDateTime::Now()
}}
724 Create a new directory entry
725 (see
\helpref{wxArchiveEntry::IsDir()
}{wxarchiveentryisdir
})
726 with the given name and timestamp.
728 \helpref{PutNextEntry()
}{wxzipoutputstreamputnextentry
} can
729 also be used to create directory entries, by supplying a name with
730 a trailing path separator.
733 \membersection{wxZipOutputStream::PutNextEntry
}\label{wxzipoutputstreamputnextentry
}
735 \func{bool
}{PutNextEntry
}{\param{wxZipEntry*
}{entry
}}
737 Takes ownership of
{\tt entry
} and uses it to create a new entry
740 \func{bool
}{PutNextEntry
}{\param{const wxString\&
}{name
},
\param{const wxDateTime\&
}{dt = wxDateTime::Now()
},
\param{off
\_t }{size = wxInvalidOffset
}}
742 Create a new entry with the given name, timestamp and size.
745 \membersection{wxZipOutputStream::SetComment
}\label{wxzipoutputstreamsetcomment
}
747 \func{void
}{SetComment
}{\param{const wxString\&
}{comment
}}
749 Sets a comment for the zip as a whole. It is written at the end of the