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:
@@ -248,6 +248,16 @@ size_t wxZlibInputStream::OnSysRead(void *buffer, size_t size)
|
||||
return major > 1 || (major == 1 && minor >= 2);
|
||||
}
|
||||
|
||||
bool wxZlibInputStream::SetDictionary(const char *data, const size_t datalen)
|
||||
{
|
||||
return (inflateSetDictionary(m_inflate, (Bytef*)data, datalen) == Z_OK);
|
||||
}
|
||||
|
||||
bool wxZlibInputStream::SetDictionary(const wxMemoryBuffer &buf)
|
||||
{
|
||||
return SetDictionary((char*)buf.GetData(), buf.GetDataLen());
|
||||
}
|
||||
|
||||
|
||||
//////////////////////
|
||||
// wxZlibOutputStream
|
||||
@@ -412,5 +422,15 @@ size_t wxZlibOutputStream::OnSysWrite(const void *buffer, size_t size)
|
||||
return wxZlibInputStream::CanHandleGZip();
|
||||
}
|
||||
|
||||
bool wxZlibOutputStream::SetDictionary(const char *data, const size_t datalen)
|
||||
{
|
||||
return (deflateSetDictionary(m_deflate, (Bytef*)data, datalen) == Z_OK);
|
||||
}
|
||||
|
||||
bool wxZlibOutputStream::SetDictionary(const wxMemoryBuffer &buf)
|
||||
{
|
||||
return SetDictionary((char*)buf.GetData(), buf.GetDataLen());
|
||||
}
|
||||
|
||||
#endif
|
||||
// wxUSE_ZLIB && wxUSE_STREAMS
|
||||
|
||||
Reference in New Issue
Block a user