mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 14:07:00 -06:00
9.34
This commit is contained in:
committed by
Kornel Lesiński
parent
83f8ddcc5b
commit
f08f4dcc3c
26
CPP/7zip/Compress/ZDecoder.h
Executable file → Normal file
26
CPP/7zip/Compress/ZDecoder.h
Executable file → Normal file
@@ -10,33 +10,45 @@
|
||||
namespace NCompress {
|
||||
namespace NZ {
|
||||
|
||||
// Z decoder decodes Z data stream, including 3 bytes of header.
|
||||
|
||||
class CDecoder:
|
||||
public ICompressCoder,
|
||||
public ICompressSetDecoderProperties2,
|
||||
public CMyUnknownImp
|
||||
{
|
||||
UInt16 *_parents;
|
||||
Byte *_suffixes;
|
||||
Byte *_stack;
|
||||
Byte _properties;
|
||||
int _numMaxBits;
|
||||
unsigned _numMaxBits;
|
||||
|
||||
public:
|
||||
CDecoder(): _parents(0), _suffixes(0), _stack(0), _properties(0), _numMaxBits(0) {};
|
||||
CDecoder(): _parents(0), _suffixes(0), _stack(0), /* _prop(0), */ _numMaxBits(0) {};
|
||||
~CDecoder();
|
||||
void Free();
|
||||
UInt64 PackSize;
|
||||
|
||||
MY_UNKNOWN_IMP1(ICompressSetDecoderProperties2)
|
||||
MY_UNKNOWN_IMP1(ICompressCoder)
|
||||
|
||||
HRESULT CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream,
|
||||
const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress);
|
||||
|
||||
STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream,
|
||||
const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress);
|
||||
|
||||
STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size);
|
||||
};
|
||||
|
||||
/*
|
||||
There is no end_of_payload_marker in Z stream.
|
||||
Z decoder stops decoding, if it reaches end of input stream.
|
||||
|
||||
CheckStream function:
|
||||
(size) must be at least 3 bytes (size of Z header).
|
||||
if (size) is larger than size of real Z stream in (data), CheckStream can return false.
|
||||
*/
|
||||
|
||||
const unsigned kRecommendedCheckSize = 64;
|
||||
|
||||
bool CheckStream(const Byte *data, size_t size);
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user