diff options
Diffstat (limited to '')
-rw-r--r-- | C/XzEnc.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* XzEnc.c -- Xz Encode | 1 | /* XzEnc.c -- Xz Encode |
2 | 2024-03-01 : Igor Pavlov : Public domain */ | 2 | : Igor Pavlov : Public domain */ |
3 | 3 | ||
4 | #include "Precomp.h" | 4 | #include "Precomp.h" |
5 | 5 | ||
@@ -411,6 +411,7 @@ static SRes SeqInFilter_Read(ISeqInStreamPtr pp, void *data, size_t *size) | |||
411 | } | 411 | } |
412 | } | 412 | } |
413 | 413 | ||
414 | Z7_FORCE_INLINE | ||
414 | static void SeqInFilter_Construct(CSeqInFilter *p) | 415 | static void SeqInFilter_Construct(CSeqInFilter *p) |
415 | { | 416 | { |
416 | p->buf = NULL; | 417 | p->buf = NULL; |
@@ -418,6 +419,7 @@ static void SeqInFilter_Construct(CSeqInFilter *p) | |||
418 | p->vt.Read = SeqInFilter_Read; | 419 | p->vt.Read = SeqInFilter_Read; |
419 | } | 420 | } |
420 | 421 | ||
422 | Z7_FORCE_INLINE | ||
421 | static void SeqInFilter_Free(CSeqInFilter *p, ISzAllocPtr alloc) | 423 | static void SeqInFilter_Free(CSeqInFilter *p, ISzAllocPtr alloc) |
422 | { | 424 | { |
423 | if (p->StateCoder.p) | 425 | if (p->StateCoder.p) |
@@ -507,6 +509,7 @@ void XzFilterProps_Init(CXzFilterProps *p) | |||
507 | void XzProps_Init(CXzProps *p) | 509 | void XzProps_Init(CXzProps *p) |
508 | { | 510 | { |
509 | p->checkId = XZ_CHECK_CRC32; | 511 | p->checkId = XZ_CHECK_CRC32; |
512 | p->numThreadGroups = 0; | ||
510 | p->blockSize = XZ_PROPS_BLOCK_SIZE_AUTO; | 513 | p->blockSize = XZ_PROPS_BLOCK_SIZE_AUTO; |
511 | p->numBlockThreads_Reduced = -1; | 514 | p->numBlockThreads_Reduced = -1; |
512 | p->numBlockThreads_Max = -1; | 515 | p->numBlockThreads_Max = -1; |
@@ -689,6 +692,7 @@ typedef struct | |||
689 | } CLzma2WithFilters; | 692 | } CLzma2WithFilters; |
690 | 693 | ||
691 | 694 | ||
695 | Z7_FORCE_INLINE | ||
692 | static void Lzma2WithFilters_Construct(CLzma2WithFilters *p) | 696 | static void Lzma2WithFilters_Construct(CLzma2WithFilters *p) |
693 | { | 697 | { |
694 | p->lzma2 = NULL; | 698 | p->lzma2 = NULL; |
@@ -712,6 +716,7 @@ static SRes Lzma2WithFilters_Create(CLzma2WithFilters *p, ISzAllocPtr alloc, ISz | |||
712 | } | 716 | } |
713 | 717 | ||
714 | 718 | ||
719 | Z7_FORCE_INLINE | ||
715 | static void Lzma2WithFilters_Free(CLzma2WithFilters *p, ISzAllocPtr alloc) | 720 | static void Lzma2WithFilters_Free(CLzma2WithFilters *p, ISzAllocPtr alloc) |
716 | { | 721 | { |
717 | #ifdef USE_SUBBLOCK | 722 | #ifdef USE_SUBBLOCK |
@@ -1236,6 +1241,7 @@ SRes XzEnc_Encode(CXzEncHandle p, ISeqOutStreamPtr outStream, ISeqInStreamPtr in | |||
1236 | } | 1241 | } |
1237 | 1242 | ||
1238 | p->mtCoder.numThreadsMax = (unsigned)props->numBlockThreads_Max; | 1243 | p->mtCoder.numThreadsMax = (unsigned)props->numBlockThreads_Max; |
1244 | p->mtCoder.numThreadGroups = props->numThreadGroups; | ||
1239 | p->mtCoder.expectedDataSize = p->expectedDataSize; | 1245 | p->mtCoder.expectedDataSize = p->expectedDataSize; |
1240 | 1246 | ||
1241 | RINOK(MtCoder_Code(&p->mtCoder)) | 1247 | RINOK(MtCoder_Code(&p->mtCoder)) |