summaryrefslogtreecommitdiff
path: root/zip/ZipArchive/ZipCompressor.cpp
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2023-12-17 21:23:58 +0100
committerTomas Bzatek <tbzatek@redhat.com>2023-12-17 21:23:58 +0100
commit02d6107c97b48888362e7c6a70dcac323c89d741 (patch)
tree5069a77adaf73f7249ac79b6c49a47168a647ef8 /zip/ZipArchive/ZipCompressor.cpp
parent4e17c2527b106f1b493a3ac77c89858d14f834e2 (diff)
downloadtuxcmd-modules-02d6107c97b48888362e7c6a70dcac323c89d741.tar.xz
ZipArchive: Update to the 4.6.9 release
Diffstat (limited to 'zip/ZipArchive/ZipCompressor.cpp')
-rw-r--r--zip/ZipArchive/ZipCompressor.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/zip/ZipArchive/ZipCompressor.cpp b/zip/ZipArchive/ZipCompressor.cpp
index 771b214..cc52d28 100644
--- a/zip/ZipArchive/ZipCompressor.cpp
+++ b/zip/ZipArchive/ZipCompressor.cpp
@@ -1,6 +1,6 @@
////////////////////////////////////////////////////////////////////////////////
-// This source file is part of the ZipArchive library source distribution and
-// is Copyrighted 2000 - 2007 by Artpol Software - Tadeusz Dracz
+// This source file is part of the ZipArchive Library Open Source distribution
+// and is Copyrighted 2000 - 2022 by Artpol Software - Tadeusz Dracz
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
@@ -9,7 +9,7 @@
//
// For the licensing details refer to the License.txt file.
//
-// Web Site: http://www.artpol-software.com
+// Web Site: https://www.artpol-software.com
////////////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
@@ -23,17 +23,18 @@ CZipCompressor* CZipCompressor::CreateCompressor(WORD uMethod, CZipStorage* pSto
{
if (uMethod == methodStore || uMethod == methodDeflate)
return new CDeflateCompressor(pStorage);
+
return NULL;
}
void CZipCompressor::UpdateFileCrc(const void *pBuffer, DWORD uSize)
{
- m_pFile->m_uCrc32 = zarch_crc32(m_pFile->m_uCrc32, (zarch_Bytef*)pBuffer, uSize);
+ m_pFile->m_uCrc32 = (DWORD)zarch_crc32(m_pFile->m_uCrc32, (zarch_Bytef*)pBuffer, uSize);
}
void CZipCompressor::UpdateCrc(const void *pBuffer, DWORD uSize)
{
- m_uCrc32 = zarch_crc32(m_uCrc32, (zarch_Bytef*)pBuffer, uSize);
+ m_uCrc32 = (DWORD)zarch_crc32(m_uCrc32, (zarch_Bytef*)pBuffer, uSize);
}
void CZipCompressor::UpdateOptions(const COptionsMap& optionsMap)
@@ -48,7 +49,7 @@ void CZipCompressor::UpdateOptions(const COptionsMap& optionsMap)
void CZipCompressor::InitBuffer()
{
- // This should be greated that 64k for deflate when creating offsets pairs is enabled
+ // This should be greater that 64k for deflate when creating offsets pairs is enabled
// otherwise deflate will not be able to write one block in one go and will never report
// a flushed block for low-compressable data
const COptions* pOptions = GetOptions();
@@ -95,8 +96,8 @@ CZipCompressor::COptionsMap::~COptionsMap()
while (IteratorValid(iter))
{
COptions* pOptions = NULL;
- int iType = 0;
- GetNextAssoc(iter, iType, pOptions);
+ int iDummyType;
+ GetNextAssoc(iter, iDummyType, pOptions);
delete pOptions;
}
RemoveAll();