X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4c68a10264347cc04b1a6634000595f160792231..32485259c1342115488d219776dfebeb3d4d81b1:/include/wx/zstream.h?ds=inline diff --git a/include/wx/zstream.h b/include/wx/zstream.h index 748abd7b47..16d43212e6 100644 --- a/include/wx/zstream.h +++ b/include/wx/zstream.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) };