diff options
author | Alex Zolotarev <deathbaba@gmail.com> | 2012-02-23 15:16:56 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:34:35 +0300 |
commit | 2499a0554430b840c6bbee52c147250fe64481f8 (patch) | |
tree | ca55edc68c14d45fa6074f313da882bc9f7d11f1 /coding/zip_reader.hpp | |
parent | 31061cd31a767c19d4dc96532aaf724ce98286ef (diff) |
Added ZipReader::UncompressedSize(). Compressed size is returned by base method Reader::Size()
Diffstat (limited to 'coding/zip_reader.hpp')
-rw-r--r-- | coding/zip_reader.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/coding/zip_reader.hpp b/coding/zip_reader.hpp index a107bc95c0..1e6237f297 100644 --- a/coding/zip_reader.hpp +++ b/coding/zip_reader.hpp @@ -13,6 +13,9 @@ class ZipFileReader : public BaseZipFileReaderType { +private: + uint64_t m_uncompressedFileSize; + public: DECLARE_EXCEPTION(OpenZipException, OpenException); DECLARE_EXCEPTION(LocateZipException, OpenException); @@ -20,7 +23,10 @@ public: ZipFileReader(string const & container, string const & file); - // Can also throw Writer::OpenException and Writer::WriteException + /// @note Size() returns compressed file size inside zip + uint64_t UncompressedSize() const { return m_uncompressedFileSize; } + + /// @warning Can also throw Writer::OpenException and Writer::WriteException static void UnzipFile(string const & zipContainer, string const & fileInZip, string const & outFilePath); |