-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Hi all, I found a strange behavior of the Compress utility for zip.
If you use something like
std::ostream& ostr = response.send();
bool bSeekable=false;
Poco::Zip::Compress c(ostr, bSeekable);
to stream for example over network (here you have a slice of code from Poco::HttpServer
std::string sFileName("c:\somefile.txt");
Poco::Path pFile(sFileName);
c.addFile(pFile, pFile, Poco::Zip::ZipCommon::CM_STORE, Poco::Zip::ZipCommon::CL_SUPERFAST);
c.close();
the addFile with Poco::Zip::ZipCommon::CM_DEFLATE is ok, with Poco::Zip::ZipCommon::CM_STORE it throw exception on outputstream. ostr is a ofstream on your disk it's all ok.
The error occur even with CM_AUTO if you try compress jpeg because internally is used CM_STORE.
Do you think it's not possible to use CM_STORE over network?