* wrt-installer should be able to check low memory at installation time
[Issue#] WGL-299
[Problem] There is no function to get uncompressed size.
[Cause] N/A
[Solution] Uncompressed size can be calcuated before unzip during installation.
[SCMRequest] N/A
Change-Id: I403242b0af066fd22826843095fea12ce95370bb
size_t m_numberOfFiles;
size_t m_globalCommentSize;
std::string m_globalComment;
+ size_t m_totalUncompressedSize;
// At least cache handles
typedef std::vector<FileInfo> FileInfoList;
* @return Global archive comment
*/
const std::string &GetGlobalComment() const;
+ size_t GetTotalUncompressedSize() const;
};
} // namespace DPL
m_device(NULL),
m_numberOfFiles(0),
m_globalComment(),
- m_fileInfos()
+ m_fileInfos(),
+ m_totalUncompressedSize(0)
{
LogPedantic("Zip input file: " << fileName);
static_cast<off64_t>(fileInfo.uncompressed_size)
)
);
+ m_totalUncompressedSize += static_cast<size_t>(fileInfo.uncompressed_size);
// If this is not the last file, go to next one
if (i != m_numberOfFiles - 1) {
{
return m_fileInfos.empty();
}
+
+size_t ZipInput::GetTotalUncompressedSize() const
+{
+ return m_totalUncompressedSize;
+}
} // namespace DPL