Namespace ZipUtils for the Inflater / Deflater classes.
This commit is contained in:
parent
dfb4b89726
commit
0e56df30f1
@ -31,13 +31,14 @@
|
||||
#include <com/sun/star/uno/Sequence.hxx>
|
||||
#include "packagedllapi.hxx"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
typedef struct z_stream_s z_stream;
|
||||
}
|
||||
struct z_stream_s;
|
||||
|
||||
namespace ZipUtils {
|
||||
|
||||
class DLLPUBLIC_PACKAGE Deflater
|
||||
{
|
||||
typedef struct z_stream_s z_stream;
|
||||
|
||||
protected:
|
||||
com::sun::star::uno::Sequence< sal_Int8 > sInBuffer;
|
||||
sal_Bool bFinish;
|
||||
@ -65,6 +66,8 @@ public:
|
||||
void SAL_CALL end( );
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -31,12 +31,14 @@
|
||||
#include <com/sun/star/uno/Sequence.hxx>
|
||||
#include "packagedllapi.hxx"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
typedef struct z_stream_s z_stream;
|
||||
}
|
||||
struct z_stream_s;
|
||||
|
||||
namespace ZipUtils {
|
||||
|
||||
class DLLPUBLIC_PACKAGE Inflater
|
||||
{
|
||||
typedef struct z_stream_s z_stream;
|
||||
|
||||
protected:
|
||||
sal_Bool bFinish, bFinished, bSetParams, bNeedDict;
|
||||
sal_Int32 nOffset, nLength, nLastInflateError;
|
||||
@ -56,6 +58,8 @@ public:
|
||||
sal_Int32 getLastInflateError() { return nLastInflateError; }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -66,7 +66,7 @@ protected:
|
||||
::rtl::OUString sComment; /* zip file comment */
|
||||
EntryHash aEntries;
|
||||
ByteGrabber aGrabber;
|
||||
Inflater aInflater;
|
||||
ZipUtils::Inflater aInflater;
|
||||
com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xStream;
|
||||
com::sun::star::uno::Reference < com::sun::star::io::XSeekable > xSeek;
|
||||
const ::com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > xFactory;
|
||||
|
@ -49,7 +49,7 @@ protected:
|
||||
::std::vector < ZipEntry * > aZipList;
|
||||
com::sun::star::uno::Sequence < sal_Int8 > aBuffer, aEncryptionBuffer;
|
||||
::rtl::OUString sComment;
|
||||
Deflater aDeflater;
|
||||
ZipUtils::Deflater aDeflater;
|
||||
rtlCipher aCipher;
|
||||
rtlDigest aDigest;
|
||||
CRC32 aCRC;
|
||||
|
@ -41,6 +41,7 @@
|
||||
|
||||
using namespace com::sun::star::packages::zip::ZipConstants;
|
||||
using namespace com::sun::star;
|
||||
using namespace ZipUtils;
|
||||
|
||||
/** Provides general purpose compression using the ZLIB compression
|
||||
* library.
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include <string.h> // for memset
|
||||
|
||||
using namespace com::sun::star::uno;
|
||||
using namespace ZipUtils;
|
||||
|
||||
/** Provides general purpose decompression using the ZLIB library */
|
||||
|
||||
|
@ -59,7 +59,7 @@ protected:
|
||||
ZipEntry maEntry;
|
||||
rtl::Reference < EncryptionData > mxData;
|
||||
rtlCipher maCipher;
|
||||
Inflater maInflater;
|
||||
ZipUtils::Inflater maInflater;
|
||||
sal_Bool mbRawStream, mbWrappedRaw, mbFinished;
|
||||
sal_Int16 mnHeaderToRead;
|
||||
sal_Int64 mnZipCurrent, mnZipEnd, mnZipSize, mnMyCurrent;
|
||||
|
@ -62,6 +62,7 @@ using namespace com::sun::star::packages::zip;
|
||||
using namespace com::sun::star::packages::zip::ZipConstants;
|
||||
|
||||
using rtl::OUString;
|
||||
using ZipUtils::Inflater;
|
||||
|
||||
/** This class is used to read entries from a zip file
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user