Files
nsis-plugin-ns7zip/versions/26.00/CPP/7zip/Compress/PpmdZip.h
T
Simone d074cc7c07 chore: initial commit (extracted from Launchers monorepo)
Plugin: ns7zip v2.0.0
Architectures: x86-ansi, x86-unicode, amd64-unicode
License: LGPL-2.1-or-later
2026-04-29 14:07:51 +02:00

79 lines
1.1 KiB
C++

// PpmdZip.h
#ifndef ZIP7_INC_COMPRESS_PPMD_ZIP_H
#define ZIP7_INC_COMPRESS_PPMD_ZIP_H
#include "../../../C/Alloc.h"
#include "../../../C/Ppmd8.h"
#include "../../Common/MyCom.h"
#include "../ICoder.h"
#include "../Common/CWrappers.h"
namespace NCompress {
namespace NPpmdZip {
struct CBuf
{
Byte *Buf;
CBuf(): Buf(NULL) {}
~CBuf() { ::MidFree(Buf); }
bool Alloc();
};
Z7_CLASS_IMP_NOQIB_3(
CDecoder
, ICompressCoder
, ICompressSetFinishMode
, ICompressGetInStreamProcessedSize
)
bool _fullFileMode;
CByteInBufWrap _inStream;
CBuf _outStream;
CPpmd8 _ppmd;
public:
CDecoder(bool fullFileMode = true);
~CDecoder();
};
struct CEncProps
{
UInt32 MemSizeMB;
UInt32 ReduceSize;
int Order;
int Restor;
CEncProps()
{
MemSizeMB = (UInt32)(Int32)-1;
ReduceSize = (UInt32)(Int32)-1;
Order = -1;
Restor = -1;
}
void Normalize(int level);
};
Z7_CLASS_IMP_NOQIB_2(
CEncoder
, ICompressCoder
, ICompressSetCoderProperties
)
CByteOutBufWrap _outStream;
CBuf _inStream;
CPpmd8 _ppmd;
CEncProps _props;
public:
CEncoder();
~CEncoder();
};
}}
#endif