Switch to Zstandard's New advanced API.

- long distance matching is enabled
- the compression should improve, the speed also
- decompression code is single threaded only
This commit is contained in:
Tino Reichardt
2018-10-26 00:09:25 +02:00
parent cc10eb2d9b
commit 739ec50c75
15 changed files with 207 additions and 235 deletions

View File

@@ -1,10 +1,9 @@
// (C) 2016 Tino Reichardt
// (C) 2016 - 2018 Tino Reichardt
#define ZSTD_STATIC_LINKING_ONLY
#include "../../../C/Alloc.h"
#include "../../../C/Threads.h"
#include "../../../C/zstd/zstd.h"
#include "../../../C/zstdmt/zstd-mt.h"
#include "../../Common/Common.h"
#include "../../Common/MyCom.h"
@@ -41,13 +40,16 @@ class CEncoder:
{
CProps _props;
ZSTD_CCtx* _ctx;
void* _srcBuf;
void* _dstBuf;
size_t _srcBufSize;
size_t _dstBufSize;
UInt64 _processedIn;
UInt64 _processedOut;
UInt32 _inputSize;
UInt32 _numThreads;
ZSTDCB_CCtx *_ctx;
HRESULT CEncoder::ErrorOut(size_t code);
HANDLE _hMutex;
public:
MY_QUERYINTERFACE_BEGIN2(ICompressCoder)