-
-
Notifications
You must be signed in to change notification settings - Fork 299
/
LizardEncoder.h
63 lines (52 loc) · 1.48 KB
/
LizardEncoder.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// (C) 2016 Tino Reichardt
#define LIZARD_STATIC_LINKING_ONLY
#include "../../../C/Alloc.h"
#include "../../../C/Threads.h"
#include "../../../C/lizard/lizard.h"
#include "../../../C/zstdmt/zstd-mt.h"
#include "../../Common/Common.h"
#include "../../Common/MyCom.h"
#include "../ICoder.h"
#include "../Common/StreamUtils.h"
#ifndef EXTRACT_ONLY
namespace NCompress {
namespace NLIZARD {
struct CProps
{
CProps() { clear (); }
void clear ()
{
memset(this, 0, sizeof (*this));
_ver_major = LIZARD_VERSION_MAJOR;
_ver_minor = LIZARD_VERSION_MINOR;
_level = 3;
}
Byte _ver_major;
Byte _ver_minor;
Byte _level;
Byte _reserved[2];
};
class CEncoder:
public ICompressCoder,
public ICompressSetCoderProperties,
public ICompressWriteCoderProperties,
public CMyUnknownImp
{
CProps _props;
UInt64 _processedIn;
UInt64 _processedOut;
UInt32 _inputSize;
UInt32 _numThreads;
LIZARDMT_CCtx *_ctx;
HRESULT CEncoder::ErrorOut(size_t code);
public:
MY_UNKNOWN_IMP2 (ICompressSetCoderProperties, ICompressWriteCoderProperties)
STDMETHOD (Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress);
STDMETHOD (SetCoderProperties)(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps);
STDMETHOD (WriteCoderProperties)(ISequentialOutStream *outStream);
STDMETHODIMP CEncoder::SetNumberOfThreads(UInt32 numThreads);
CEncoder();
virtual ~CEncoder();
};
}}
#endif