X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..aa017eabe201ae64903d9267251679274c305e1a:/include/wx/zstream.h?ds=sidebyside diff --git a/include/wx/zstream.h b/include/wx/zstream.h index 748abd7b47..74ece7fb5b 100644 --- a/include/wx/zstream.h +++ b/include/wx/zstream.h @@ -11,10 +11,6 @@ #ifndef _WX_WXZSTREAM_H__ #define _WX_WXZSTREAM_H__ -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma interface "zstream.h" -#endif - #include "wx/defs.h" #if wxUSE_ZLIB && wxUSE_STREAMS @@ -46,19 +42,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 +65,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 +83,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) };