]>
git.saurik.com Git - wxWidgets.git/blob - contrib/src/xrc/xmlbinz.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxXmlIOHandlerBinZ
4 // Author: Vaclav Slavik
7 // Copyright: (c) 2000 Vaclav Slavik
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 // nothing, already in xml.cpp
15 // For compilers that support precompilation, includes "wx.h".
16 #include "wx/wxprec.h"
22 #include "wx/datstrm.h"
24 #include "wx/zstream.h"
26 #include "wx/xrc/xmlio.h"
32 bool wxXmlIOHandlerBinZ::CanLoad(wxInputStream
& stream
)
35 canread
= (ReadHeader(stream
) == wxT("XMLBINZ"));
36 stream
.SeekI(-9, wxFromCurrent
);
42 bool wxXmlIOHandlerBinZ::Save(wxOutputStream
& stream
, const wxXmlDocument
& doc
)
44 WriteHeader(stream
, "XMLBINZ");
45 wxZlibOutputStream
costr(stream
, 9);
46 return wxXmlIOHandlerBin::Save(costr
, doc
);
51 bool wxXmlIOHandlerBinZ::Load(wxInputStream
& stream
, wxXmlDocument
& doc
)
54 wxZlibInputStream
costr(stream
);
55 return wxXmlIOHandlerBin::Load(costr
, doc
);