This submission is small change to the zip plugin that allows a password to be 
passed via osgDB::Options to the zip decompressor.
The change allows password protected zip files to be loaded. 

This is the changed section of ReaderWriterZIP.cpp relative to revision 
[10850], complete file attached.  


Code:
... 
std::string password = "";
if (options)
{
password = options->getPluginStringData("password");
}

fin.read(pMemBuffer, ulzipFileLength);
if ((unsigned int)fin.gcount() == ulzipFileLength)
{
HZIP hz = OpenZip(pMemBuffer, ulzipFileLength, password.c_str());
... 




Chris Denham.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=20829#20829




Attachments: 
http://forum.openscenegraph.org//files/readerwriterzip_234.cpp


_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to