X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..748a46846984b408135b2e1c1093db31f9296543:/include/wx/zstream.h diff --git a/include/wx/zstream.h b/include/wx/zstream.h index f5ec6a5906..16d43212e6 100644 --- a/include/wx/zstream.h +++ b/include/wx/zstream.h @@ -6,7 +6,7 @@ // Created: 11/07/98 // RCS-ID: $Id$ // Copyright: (c) Guilhem Lavaux -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_WXZSTREAM_H__ #define _WX_WXZSTREAM_H__ @@ -46,19 +46,19 @@ class WXDLLIMPEXP_BASE wxZlibInputStream: public wxFilterInputStream { virtual ~wxZlibInputStream(); char Peek() { return wxInputStream::Peek(); } - size_t GetSize() const { return wxInputStream::GetSize(); } + wxFileOffset GetLength() const { return wxInputStream::GetLength(); } static bool CanHandleGZip(); protected: size_t OnSysRead(void *buffer, size_t size); - off_t OnSysTell() const { return m_pos; } + wxFileOffset OnSysTell() const { return m_pos; } protected: size_t m_z_size; unsigned char *m_z_buffer; struct z_stream_s *m_inflate; - off_t m_pos; + wxFileOffset m_pos; #if WXWIN_COMPATIBILITY_2_4 bool m_24compatibilty; #endif @@ -69,16 +69,17 @@ class WXDLLIMPEXP_BASE wxZlibInputStream: public wxFilterInputStream { class WXDLLIMPEXP_BASE wxZlibOutputStream: public wxFilterOutputStream { public: wxZlibOutputStream(wxOutputStream& stream, int level = -1, int flags = wxZLIB_ZLIB); - virtual ~wxZlibOutputStream(); + virtual ~wxZlibOutputStream() { Close(); } void Sync() { DoFlush(false); } - size_t GetSize() const { return (size_t)m_pos; } + bool Close(); + wxFileOffset GetLength() const { return m_pos; } static bool CanHandleGZip(); protected: size_t OnSysWrite(const void *buffer, size_t size); - off_t OnSysTell() const { return m_pos; } + wxFileOffset OnSysTell() const { return m_pos; } virtual void DoFlush(bool final); @@ -86,7 +87,7 @@ class WXDLLIMPEXP_BASE wxZlibOutputStream: public wxFilterOutputStream { size_t m_z_size; unsigned char *m_z_buffer; struct z_stream_s *m_deflate; - off_t m_pos; + wxFileOffset m_pos; DECLARE_NO_COPY_CLASS(wxZlibOutputStream) };