Library: Zip
Package: Zip
Header: Poco/Zip/Compress.h
Compresses a directory or files as zip.
Member Functions: addDirectory, addFile, addRecursive, close
Compress(
std::ostream & out,
bool seekableOut
);
seekableOut determines how we write the zip, setting it to true is recommended for local files (smaller zip file), if you are compressing directly to a network, you MUST set it to false
~Compress();
void addDirectory(
const Poco::Path & entryName,
const Poco::DateTime & lastModifiedAt
);
Adds a directory entry excluding all children to the Zip file, entryName must not be empty.
void addFile(
std::istream & input,
const Poco::DateTime & lastModifiedAt,
const Poco::Path & fileName,
ZipCommon::CompressionMethod cm = ZipCommon::CM_DEFLATE,
ZipCommon::CompressionLevel cl = ZipCommon::CL_MAXIMUM
);
void addFile(
const Poco::Path & file,
const Poco::Path & fileName,
ZipCommon::CompressionMethod cm = ZipCommon::CM_DEFLATE,
ZipCommon::CompressionLevel cl = ZipCommon::CL_MAXIMUM
);
Adds a single file to the Zip File. fileName must not be a directory name. The file must exist physically!
void addRecursive(
const Poco::Path & entry,
ZipCommon::CompressionLevel cl = ZipCommon::CL_MAXIMUM,
bool excludeRoot = true,
const Poco::Path & name = Poco::Path ()
);
Adds a directory entry recursively to the zip file, set excludeRoot to false to exclude the parent directory. If excludeRoot is true you can specify an empty name to add the files as relative files
ZipArchive close();
Finalizes the ZipArchive, closes it.
Poco::FIFOEvent < const ZipLocalFileHeader > EDone;