Back to index

scribus-ng  1.3.4.dfsg+svn20071115
scgzfile.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 
00008 #ifndef SCGZFILE_H
00009 #define SCGZFILE_H
00010 
00011 #include <qstring.h>
00012 #include <qcstring.h>
00013 
00014 #include "scribusapi.h"
00015 
00016 class SCRIBUS_API ScGzFile 
00017 {
00018 protected:
00019        QString fname;
00020        QByteArray barray;
00021 public:
00022        ScGzFile(const QString& filename);
00023        ScGzFile(const QString& filename, const QByteArray& array);
00024 
00025        static const int gzipExpansionFactor;
00026 
00027        const QString& fileName() { return fname; }
00028        const QByteArray& data() { return barray; }
00029        void  setData(const QByteArray& array) { barray = array; }
00030 
00031        bool read(uint maxBytes = 0);
00032        bool write(void);
00033        bool write(const char* header);
00034 };
00035 
00036 #endif