added wxZlibStream::SetDictionary() (closes #10551)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59370 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-03-06 16:26:15 +00:00
parent aa8166dd51
commit 51acf83bd6
5 changed files with 79 additions and 5 deletions

View File

@@ -76,6 +76,19 @@ public:
Returns @true if zlib library in use can handle gzip compressed data.
*/
static bool CanHandleGZip();
//@{
/**
Sets the dictionary to the specified chunk of data. This can improve
compression rate but note that the dictionary has to be the same when
you deflate the data as when you inflate the data, otherwise you
will inflate corrupted data.
Returns @true if the dictionary was successfully set.
*/
bool SetDictionary(const char *data, const size_t datalen);
bool SetDictionary(const wxMemoryBuffer &buf);
//@}
};
@@ -122,5 +135,18 @@ public:
Returns @true if zlib library in use can handle gzip compressed data.
*/
static bool CanHandleGZip();
//@{
/**
Sets the dictionary to the specified chunk of data. This can improve
compression rate but note that the dictionary has to be the same when
you deflate the data as when you inflate the data, otherwise you
will inflate corrupted data.
Returns @true if the dictionary was successfully set.
*/
bool SetDictionary(const char *data, const size_t datalen);
bool SetDictionary(const wxMemoryBuffer &buf);
//@}
};