Implement custom LZMA dictionary size support, fixes #154

This commit is contained in:
vit9696 2018-12-30 18:37:27 +03:00
parent e6f84f9f7d
commit 4bee991c94
9 changed files with 93 additions and 33 deletions

View file

@ -64,7 +64,8 @@ LzmaCompress (
CONST UINT8 *Source,
UINT32 SourceSize,
UINT8 *Destination,
UINT32 *DestinationSize
UINT32 *DestinationSize,
UINT32 DictionarySize
)
{
SRes LzmaResult;
@ -79,8 +80,7 @@ LzmaCompress (
}
LzmaEncProps_Init(&props);
// TODO: need to detect this instead of hardcoding
props.dictSize = LZMA_DICTIONARY_SIZE;
props.dictSize = DictionarySize;
props.level = 9;
props.fb = 273;