mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 18:07:15 -06:00
merge multi threading to master branch
- updated zstd to latest devel release - lz4, lz5 and zstd is included now - all three support threading
This commit is contained in:
@@ -17,8 +17,6 @@
|
||||
#include "Common/DummyOutStream.h"
|
||||
#include "Common/HandlerOut.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
using namespace NWindows;
|
||||
|
||||
namespace NArchive {
|
||||
@@ -109,6 +107,14 @@ API_FUNC_static_IsArc IsArc_zstd(const Byte *p, size_t size)
|
||||
|
||||
UInt32 magic = GetUi32(p);
|
||||
|
||||
// skippable frames
|
||||
if (magic >= 0x184D2A50 && magic <= 0x184D2A5F) {
|
||||
if (size < 16)
|
||||
return k_IsArc_Res_NEED_MORE;
|
||||
magic = GetUi32(p+12);
|
||||
}
|
||||
|
||||
#ifdef ZSTD_LEGACY_SUPPORT
|
||||
// zstd 0.1
|
||||
if (magic == 0xFD2FB51E)
|
||||
return k_IsArc_Res_YES;
|
||||
@@ -116,10 +122,11 @@ API_FUNC_static_IsArc IsArc_zstd(const Byte *p, size_t size)
|
||||
// zstd magic's for 0.2 .. 0.8 (aka 1.x)
|
||||
if (magic >= 0xFD2FB522 && magic <= 0xFD2FB528)
|
||||
return k_IsArc_Res_YES;
|
||||
|
||||
// skippable frames
|
||||
if (magic >= 0x184D2A50 && magic <= 0x184D2A5F)
|
||||
#else
|
||||
/* only version 1.x */
|
||||
if (magic == 0xFD2FB528)
|
||||
return k_IsArc_Res_YES;
|
||||
#endif
|
||||
|
||||
return k_IsArc_Res_NO;
|
||||
}
|
||||
@@ -223,10 +230,6 @@ STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems,
|
||||
result = decoderSpec->CodeResume(outStream, &unpackedSize, progress);
|
||||
UInt64 streamSize = decoderSpec->GetInputProcessedSize();
|
||||
|
||||
printf("streamsize=%d packsize=%d unpackedSize=%d\n",
|
||||
streamSize, packSize, unpackedSize);
|
||||
fflush(stdout);
|
||||
|
||||
if (result != S_FALSE && result != S_OK)
|
||||
return result;
|
||||
|
||||
@@ -362,7 +365,7 @@ STDMETHODIMP CHandler::SetProperties(const wchar_t * const *names, const PROPVAR
|
||||
return _props.SetProperties(names, values, numProps);
|
||||
}
|
||||
|
||||
static const Byte k_Signature[] = "0xFD2FB525..0xFD2FB528";
|
||||
static const Byte k_Signature[] = "0xFD2FB522..28";
|
||||
|
||||
REGISTER_ARC_IO(
|
||||
"zstd", "zst tzstd", "* .tar", 0x0e,
|
||||
|
||||
Reference in New Issue
Block a user