From 3d7c030c1ed84c93538b5b0062296f5842444fe9 Mon Sep 17 00:00:00 2001 From: nyashbox Date: Sun, 1 Dec 2024 00:30:11 +0200 Subject: [PATCH] fix(Zip): implement ZipArchiveInfo64::getVersionMadeBy() and ZipArchiveInfo64::getRequiredVersion() methods --- Zip/include/Poco/Zip/ZipArchiveInfo.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Zip/include/Poco/Zip/ZipArchiveInfo.h b/Zip/include/Poco/Zip/ZipArchiveInfo.h index a4c4bf9d1..093e34e58 100644 --- a/Zip/include/Poco/Zip/ZipArchiveInfo.h +++ b/Zip/include/Poco/Zip/ZipArchiveInfo.h @@ -134,10 +134,10 @@ public: ~ZipArchiveInfo64(); /// Destroys the ZipArchiveInfo64. - void getVersionMadeBy(int& major, int& minor); + Poco::UInt16 getVersionMadeBy() const; /// The ZIP version used to create the file - void getRequiredVersion(int& major, int& minor); + Poco::UInt16 getRequiredVersion() const; /// The minimum version required to extract the data Poco::UInt32 getDiskNumber() const; @@ -232,6 +232,15 @@ private: // inlines // +inline Poco::UInt16 ZipArchiveInfo64::getVersionMadeBy() const +{ + return ZipUtil::get16BitValue(_rawInfo, VERSIONMADEBY_POS); +} + +inline Poco::UInt16 ZipArchiveInfo64::getRequiredVersion() const +{ + return ZipUtil::get16BitValue(_rawInfo, VERSION_NEEDED_POS); +} inline Poco::UInt16 ZipArchiveInfo::getDiskNumber() const {