diff options
Diffstat (limited to 'C/ZstdDec.c')
-rw-r--r-- | C/ZstdDec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/C/ZstdDec.c b/C/ZstdDec.c index ecf6d22..ac159d6 100644 --- a/C/ZstdDec.c +++ b/C/ZstdDec.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* ZstdDec.c -- Zstd Decoder | 1 | /* ZstdDec.c -- Zstd Decoder |
2 | 2024-01-21 : the code was developed by Igor Pavlov, using Zstandard format | 2 | 2024-05-26 : the code was developed by Igor Pavlov, using Zstandard format |
3 | specification and original zstd decoder code as reference code. | 3 | specification and original zstd decoder code as reference code. |
4 | original zstd decoder code: Copyright (c) Facebook, Inc. All rights reserved. | 4 | original zstd decoder code: Copyright (c) Facebook, Inc. All rights reserved. |
5 | This source code is licensed under BSD 3-Clause License. | 5 | This source code is licensed under BSD 3-Clause License. |
@@ -2507,6 +2507,7 @@ SRes ZstdDec1_DecodeBlock(CZstdDec1 *p, | |||
2507 | if (vars.numSeqs == 0) | 2507 | if (vars.numSeqs == 0) |
2508 | { | 2508 | { |
2509 | p->winPos += numLits; | 2509 | p->winPos += numLits; |
2510 | UPDATE_TOTAL_OUT(p, numLits) | ||
2510 | return SZ_OK; | 2511 | return SZ_OK; |
2511 | } | 2512 | } |
2512 | } | 2513 | } |
@@ -3310,11 +3311,11 @@ static SRes ZstdDec_DecodeBlock(CZstdDec * const p, CZstdDecState * const ds, | |||
3310 | { | 3311 | { |
3311 | const SizeT xxh64_winPos = p->decoder.winPos - ZstdDec_GET_UNPROCESSED_XXH64_SIZE(p); | 3312 | const SizeT xxh64_winPos = p->decoder.winPos - ZstdDec_GET_UNPROCESSED_XXH64_SIZE(p); |
3312 | p->decoder.winPos += outCur; | 3313 | p->decoder.winPos += outCur; |
3314 | UPDATE_TOTAL_OUT(&p->decoder, outCur) | ||
3313 | p->contentProcessed += outCur; | 3315 | p->contentProcessed += outCur; |
3314 | ZstdDec_Update_XXH(p, xxh64_winPos); | 3316 | ZstdDec_Update_XXH(p, xxh64_winPos); |
3315 | } | 3317 | } |
3316 | // ds->winPos = p->decoder.winPos; // the caller does it instead. for debug: | 3318 | // ds->winPos = p->decoder.winPos; // the caller does it instead. for debug: |
3317 | UPDATE_TOTAL_OUT(&p->decoder, outCur) | ||
3318 | ds->outProcessed += outCur; | 3319 | ds->outProcessed += outCur; |
3319 | if (p->blockSize -= (UInt32)outCur) | 3320 | if (p->blockSize -= (UInt32)outCur) |
3320 | { | 3321 | { |