This commit is contained in:
Igor Pavlov
2005-05-30 00:00:00 +00:00
committed by Kornel Lesiński
parent 8c1b5c7b7e
commit 3c510ba80b
926 changed files with 40559 additions and 23519 deletions

View File

@@ -3,9 +3,7 @@
#ifndef __IMPLODE_DECODER_H
#define __IMPLODE_DECODER_H
#pragma once
#include "Common/MyCom.h"
#include "../../../Common/MyCom.h"
#include "../../ICoder.h"
#include "../LZ/LZOutWindow.h"
@@ -16,19 +14,9 @@ namespace NCompress {
namespace NImplode {
namespace NDecoder {
class CException
{
public:
enum ECauseType
{
kData
} m_Cause;
CException(ECauseType cause): m_Cause(cause) {}
};
class CCoder :
public ICompressCoder,
public ICompressSetDecoderProperties,
public ICompressSetDecoderProperties2,
public CMyUnknownImp
{
CLZOutWindow m_OutWindowStream;
@@ -38,38 +26,34 @@ class CCoder :
NImplode::NHuffman::CDecoder m_LengthDecoder;
NImplode::NHuffman::CDecoder m_DistanceDecoder;
bool m_BigDictionaryOn;
bool m_LiteralsOn;
int m_NumDistanceLowDirectBits;
UINT32 m_MinMatchLength;
UInt32 m_MinMatchLength;
void ReadLevelItems(NImplode::NHuffman::CDecoder &table,
BYTE *levels, int numLevelItems);
Byte *levels, int numLevelItems);
void ReadTables();
void DeCodeLevelTable(BYTE *newLevels, int numLevels);
void DeCodeLevelTable(Byte *newLevels, int numLevels);
public:
CCoder();
MY_UNKNOWN_IMP1(ICompressSetDecoderProperties)
MY_UNKNOWN_IMP1(ICompressSetDecoderProperties2)
// STDMETHOD(ReleaseStreams)();
// STDMETHOD(Code)(UINT32 aSize, UINT32 &aProcessedSize);
void ReleaseStreams();
HRESULT (Flush)() { return m_OutWindowStream.Flush(); }
STDMETHOD(CodeReal)(ISequentialInStream *inStream,
ISequentialOutStream *outStream, const UINT64 *inSize, const UINT64 *outSize,
STDMETHOD(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,
STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream,
const UInt64 *inSize, const UInt64 *outSize,
ICompressProgressInfo *progress);
// ICompressSetDecoderProperties
// STDMETHOD(SetCoderProperties)(PROPVARIANT *aProperties, UINT32 aNumProperties);
STDMETHOD(SetDecoderProperties)(ISequentialInStream *inStream);
STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size);
};
}}}