class CMethodProps: public CProps
{
HRESULT SetParam(const UString &name, const UString &value); public: int GetLevel() const; int Get_NumThreads() const
{ int i = FindProp(NCoderPropID::kNumThreads); if (i >= 0) if (Props[i].Value.vt == VT_UI4) return (int)Props[i].Value.ulVal; return -1;
}
bool Get_DicSize(UInt32 &res) const
{
res = 0; int i = FindProp(NCoderPropID::kDictionarySize); if (i >= 0) if (Props[i].Value.vt == VT_UI4)
{
res = Props[i].Value.ulVal; returntrue;
} returnfalse;
}
int FindProp(PROPID id) const;
UInt32 Get_Lzma_Algo() const
{ int i = FindProp(NCoderPropID::kAlgorithm); if (i >= 0) if (Props[i].Value.vt == VT_UI4) return Props[i].Value.ulVal; return GetLevel() >= 5 ? 1 : 0;
}
UInt32 Get_Lzma_DicSize() const
{ int i = FindProp(NCoderPropID::kDictionarySize); if (i >= 0) if (Props[i].Value.vt == VT_UI4) return Props[i].Value.ulVal; int level = GetLevel(); return level <= 5 ? (1 << (level * 2 + 14)) : (level == 6 ? (1 << 25) : (1 << 26));
}
bool Get_Lzma_Eos() const
{ int i = FindProp(NCoderPropID::kEndMarker); if (i >= 0)
{ const NWindows::NCOM::CPropVariant &val = Props[i].Value; if (val.vt == VT_BOOL) return VARIANT_BOOLToBool(val.boolVal);
} returnfalse;
}
bool Are_Lzma_Model_Props_Defined() const
{ if (FindProp(NCoderPropID::kPosStateBits) >= 0) returntrue; if (FindProp(NCoderPropID::kLitContextBits) >= 0) returntrue; if (FindProp(NCoderPropID::kLitPosBits) >= 0) returntrue; returnfalse;
}
UInt32 Get_Lzma_NumThreads() const
{ if (Get_Lzma_Algo() == 0) return 1; int numThreads = Get_NumThreads(); if (numThreads >= 0) return numThreads < 2 ? 1 : 2; return 2;
}
int Get_Xz_NumThreads(UInt32 &lzmaThreads) const
{
lzmaThreads = 1; int numThreads = Get_NumThreads(); if (numThreads >= 0 && numThreads <= 1) return 1; if (Get_Lzma_Algo() != 0)
lzmaThreads = 2; return numThreads;
}
UInt64 GetProp_BlockSize(PROPID id) const
{ int i = FindProp(id); if (i >= 0)
{ const NWindows::NCOM::CPropVariant &val = Props[i].Value; if (val.vt == VT_UI4) { return val.ulVal; } if (val.vt == VT_UI8) { return val.uhVal.QuadPart; }
} return 0;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.