mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-10 10:07:13 -06:00
4.27 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
31e7b924e8
commit
d66cf2fcf3
@@ -320,6 +320,14 @@ SOURCE=..\..\Common\StreamObjects.cpp
|
||||
|
||||
SOURCE=..\..\Common\StreamObjects.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\StreamUtils.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\StreamUtils.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Engine"
|
||||
|
||||
|
||||
@@ -148,6 +148,7 @@ const wchar_t *kMethods[] =
|
||||
|
||||
const int kNumMethods = sizeof(kMethods) / sizeof(kMethods[0]);
|
||||
const wchar_t *kUnknownMethod = L"Unknown";
|
||||
const wchar_t *kPPMdMethod = L"PPMd";
|
||||
|
||||
CHandler::CHandler():
|
||||
m_ArchiveIsOpen(false)
|
||||
@@ -258,6 +259,8 @@ STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID aPropID, PROPVARIANT *a
|
||||
UString method;
|
||||
if (item.CompressionMethod < kNumMethods)
|
||||
method = kMethods[item.CompressionMethod];
|
||||
else if (item.CompressionMethod == NFileHeader::NCompressionMethod::kWinZipPPMd)
|
||||
method = kPPMdMethod;
|
||||
else
|
||||
method = kUnknownMethod;
|
||||
propVariant = method;
|
||||
|
||||
@@ -67,7 +67,8 @@ namespace NFileHeader
|
||||
kDeflated64 = 9,
|
||||
kPKImploding = 10,
|
||||
|
||||
kBZip2 = 12
|
||||
kBZip2 = 12,
|
||||
kWinZipPPMd = 0x62
|
||||
};
|
||||
const int kNumCompressionMethods = 11;
|
||||
const Byte kMadeByProgramVersion = 20;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "Common/StringConvert.h"
|
||||
#include "Common/DynamicBuffer.h"
|
||||
#include "../../Common/LimitedStreams.h"
|
||||
#include "../../Common/StreamUtils.h"
|
||||
|
||||
namespace NArchive {
|
||||
namespace NZip {
|
||||
@@ -87,13 +88,10 @@ bool CInArchive::FindAndReadMarker(const UInt64 *searchHeaderSizeLimit)
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Read Operations
|
||||
|
||||
HRESULT CInArchive::ReadBytes(void *data, UInt32 size, UInt32 *processedSize)
|
||||
{
|
||||
UInt32 realProcessedSize;
|
||||
HRESULT result = m_Stream->Read(data, size, &realProcessedSize);
|
||||
HRESULT result = ReadStream(m_Stream, data, size, &realProcessedSize);
|
||||
if(processedSize != NULL)
|
||||
*processedSize = realProcessedSize;
|
||||
m_Position += realProcessedSize;
|
||||
@@ -158,9 +156,6 @@ UInt64 CInArchive::ReadUInt64()
|
||||
return value;
|
||||
}
|
||||
|
||||
//////////////////////////////////
|
||||
// Read headers
|
||||
|
||||
bool CInArchive::ReadUInt32(UInt32 &value)
|
||||
{
|
||||
value = 0;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "Common/StringConvert.h"
|
||||
#include "Common/CRC.h"
|
||||
#include "../../Common/OffsetStream.h"
|
||||
#include "../../Common/StreamUtils.h"
|
||||
|
||||
namespace NArchive {
|
||||
namespace NZip {
|
||||
@@ -46,7 +47,7 @@ void COutArchive::PrepareWriteCompressedData2(UInt16 fileNameLength, UInt64 unPa
|
||||
void COutArchive::WriteBytes(const void *buffer, UInt32 size)
|
||||
{
|
||||
UInt32 processedSize;
|
||||
if(m_Stream->Write(buffer, size, &processedSize) != S_OK)
|
||||
if(WriteStream(m_Stream, buffer, size, &processedSize) != S_OK)
|
||||
throw 0;
|
||||
if(processedSize != size)
|
||||
throw 0;
|
||||
|
||||
@@ -38,6 +38,7 @@ WIN_OBJS = \
|
||||
$O\OutBuffer.obj \
|
||||
$O\ProgressUtils.obj \
|
||||
$O\StreamObjects.obj \
|
||||
$O\StreamUtils.obj \
|
||||
|
||||
AR_COMMON_OBJS = \
|
||||
$O\CodecsPath.obj \
|
||||
|
||||
Reference in New Issue
Block a user