4.45 beta

This commit is contained in:
Igor Pavlov
2007-04-17 00:00:00 +00:00
committed by Kornel Lesiński
parent d9666cf046
commit a145bfc7cf
458 changed files with 13144 additions and 18608 deletions
+11 -21
View File
@@ -3,24 +3,19 @@
#include "StdAfx.h"
#include "../../Common/ProgressUtils.h"
#include "../../Common/CreateCoder.h"
#include "Windows/PropVariant.h"
#include "BZip2Update.h"
#ifdef COMPRESS_BZIP2
#include "../../Compress/BZip2/BZip2Encoder.h"
#else
// {23170F69-40C1-278B-0402-020000000100}
DEFINE_GUID(CLSID_CCompressBZip2Encoder,
0x23170F69, 0x40C1, 0x278B, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00);
#include "../Common/CoderLoader.h"
extern CSysString GetBZip2CodecPath();
#endif
namespace NArchive {
namespace NBZip2 {
HRESULT UpdateArchive(UInt64 unpackSize,
static const CMethodId kMethodId_BZip2 = 0x040202;
HRESULT UpdateArchive(
DECL_EXTERNAL_CODECS_LOC_VARS
UInt64 unpackSize,
ISequentialOutStream *outStream,
int indexInClient,
UInt32 dictionary,
@@ -42,17 +37,12 @@ HRESULT UpdateArchive(UInt64 unpackSize,
CMyComPtr<ICompressProgressInfo> localProgress = localProgressSpec;
localProgressSpec->Init(updateCallback, true);
#ifndef COMPRESS_BZIP2
CCoderLibrary lib;
#endif
CMyComPtr<ICompressCoder> encoder;
#ifdef COMPRESS_BZIP2
encoder = new NCompress::NBZip2::CEncoder;
#else
RINOK(lib.LoadAndCreateCoder(GetBZip2CodecPath(),
CLSID_CCompressBZip2Encoder, &encoder));
#endif
RINOK(CreateCoder(
EXTERNAL_CODECS_LOC_VARS
kMethodId_BZip2, encoder, true));
if (!encoder)
return E_NOTIMPL;
CMyComPtr<ICompressSetCoderProperties> setCoderProperties;
encoder.QueryInterface(IID_ICompressSetCoderProperties, &setCoderProperties);
if (setCoderProperties)