⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rar29decoder.h

📁 著名的7zip的压缩算法,压缩比最高,但是压缩时间也比较长!
💻 H
字号:
// Rar29Decoder.h
// According to unRAR license,
// this code may not be used to develop a 
// RAR (WinRAR) compatible archiver

#ifndef __RAR_DECODER_H
#define __RAR_DECODER_H

#include "Common/MyCom.h"

#include "../../ICoder.h"

#include "Original/rar.hpp"

namespace NCompress {

namespace NRar29 {

class CDecoder :
  public ICompressCoder,
  public ICompressSetDecoderProperties2,
  public CMyUnknownImp
{
  Unpack *Unp;
  bool m_IsSolid;
public:
  ComprDataIO DataIO;
  CDecoder();
  ~CDecoder();
  /*
  class CCoderReleaser
  {
    CCoder *m_Coder;
  public:
    CCoderReleaser(CCoder *aCoder): m_Coder(aCoder) {}
    ~CCoderReleaser()
    {
      m_Coder->DataIO.ReleaseStreams();
    }
  };
  */
  MY_UNKNOWN_IMP1(ICompressSetDecoderProperties2)

  // void ReleaseStreams();
  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,
      ICompressProgressInfo *progress);
  STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size);
};

}

namespace NRar15{

class CDecoder :
  public ICompressCoder,
  public ICompressSetDecoderProperties2,
  public CMyUnknownImp
{
  Unpack *Unp;
  bool m_IsSolid;
public:
  ComprDataIO DataIO;
  CDecoder();
  ~CDecoder();
  /*
  class CCoderReleaser
  {
    CDecoder *m_Coder;
  public:
    CCoderReleaser(CDecoder *coder): m_Coder(coder) {}
    ~CCoderReleaser()
    {
      m_Coder->DataIO.ReleaseStreams();
    }
  };
  */
  MY_UNKNOWN_IMP1(ICompressSetDecoderProperties2)

  // void ReleaseStreams();
  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,
      ICompressProgressInfo *progress);
  STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size);
};

}

}

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -