diff options
Diffstat (limited to 'C')
-rw-r--r-- | C/7zVersion.h | 6 | ||||
-rw-r--r-- | C/CpuArch.h | 4 | ||||
-rw-r--r-- | C/ZstdDec.c | 6 |
3 files changed, 10 insertions, 6 deletions
diff --git a/C/7zVersion.h b/C/7zVersion.h index 75052e9..9a335a0 100644 --- a/C/7zVersion.h +++ b/C/7zVersion.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #define MY_VER_MAJOR 24 | 1 | #define MY_VER_MAJOR 24 |
2 | #define MY_VER_MINOR 06 | 2 | #define MY_VER_MINOR 07 |
3 | #define MY_VER_BUILD 0 | 3 | #define MY_VER_BUILD 0 |
4 | #define MY_VERSION_NUMBERS "24.06" | 4 | #define MY_VERSION_NUMBERS "24.07" |
5 | #define MY_VERSION MY_VERSION_NUMBERS | 5 | #define MY_VERSION MY_VERSION_NUMBERS |
6 | 6 | ||
7 | #ifdef MY_CPU_NAME | 7 | #ifdef MY_CPU_NAME |
@@ -10,7 +10,7 @@ | |||
10 | #define MY_VERSION_CPU MY_VERSION | 10 | #define MY_VERSION_CPU MY_VERSION |
11 | #endif | 11 | #endif |
12 | 12 | ||
13 | #define MY_DATE "2024-05-26" | 13 | #define MY_DATE "2024-06-19" |
14 | #undef MY_COPYRIGHT | 14 | #undef MY_COPYRIGHT |
15 | #undef MY_VERSION_COPYRIGHT_DATE | 15 | #undef MY_VERSION_COPYRIGHT_DATE |
16 | #define MY_AUTHOR_NAME "Igor Pavlov" | 16 | #define MY_AUTHOR_NAME "Igor Pavlov" |
diff --git a/C/CpuArch.h b/C/CpuArch.h index d632c2b..683cfaa 100644 --- a/C/CpuArch.h +++ b/C/CpuArch.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* CpuArch.h -- CPU specific code | 1 | /* CpuArch.h -- CPU specific code |
2 | 2024-05-18 : Igor Pavlov : Public domain */ | 2 | 2024-06-17 : Igor Pavlov : Public domain */ |
3 | 3 | ||
4 | #ifndef ZIP7_INC_CPU_ARCH_H | 4 | #ifndef ZIP7_INC_CPU_ARCH_H |
5 | #define ZIP7_INC_CPU_ARCH_H | 5 | #define ZIP7_INC_CPU_ARCH_H |
@@ -564,6 +564,7 @@ problem-4 : performace: | |||
564 | #define SetBe32a(p, v) { *(UInt32 *)(void *)(p) = (v); } | 564 | #define SetBe32a(p, v) { *(UInt32 *)(void *)(p) = (v); } |
565 | #define SetBe16a(p, v) { *(UInt16 *)(void *)(p) = (v); } | 565 | #define SetBe16a(p, v) { *(UInt16 *)(void *)(p) = (v); } |
566 | 566 | ||
567 | #define GetUi64a(p) GetUi64(p) | ||
567 | #define GetUi32a(p) GetUi32(p) | 568 | #define GetUi32a(p) GetUi32(p) |
568 | #define GetUi16a(p) GetUi16(p) | 569 | #define GetUi16a(p) GetUi16(p) |
569 | #define SetUi32a(p, v) SetUi32(p, v) | 570 | #define SetUi32a(p, v) SetUi32(p, v) |
@@ -571,6 +572,7 @@ problem-4 : performace: | |||
571 | 572 | ||
572 | #elif defined(MY_CPU_LE) | 573 | #elif defined(MY_CPU_LE) |
573 | 574 | ||
575 | #define GetUi64a(p) (*(const UInt64 *)(const void *)(p)) | ||
574 | #define GetUi32a(p) (*(const UInt32 *)(const void *)(p)) | 576 | #define GetUi32a(p) (*(const UInt32 *)(const void *)(p)) |
575 | #define GetUi16a(p) (*(const UInt16 *)(const void *)(p)) | 577 | #define GetUi16a(p) (*(const UInt16 *)(const void *)(p)) |
576 | #define SetUi32a(p, v) { *(UInt32 *)(void *)(p) = (v); } | 578 | #define SetUi32a(p, v) { *(UInt32 *)(void *)(p) = (v); } |
diff --git a/C/ZstdDec.c b/C/ZstdDec.c index ac159d6..6ad47eb 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-05-26 : the code was developed by Igor Pavlov, using Zstandard format | 2 | 2024-06-18 : 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. |
@@ -1308,8 +1308,10 @@ FSE_Decode_SeqTable(CFseRecord * const table, | |||
1308 | in->len--; | 1308 | in->len--; |
1309 | { | 1309 | { |
1310 | const Byte *ptr = in->ptr; | 1310 | const Byte *ptr = in->ptr; |
1311 | const Byte sym = ptr[0]; | 1311 | const unsigned sym = ptr[0]; |
1312 | in->ptr = ptr + 1; | 1312 | in->ptr = ptr + 1; |
1313 | if (sym >= numSymbolsMax) | ||
1314 | return SZ_ERROR_DATA; | ||
1313 | table[0] = (FastInt32)sym | 1315 | table[0] = (FastInt32)sym |
1314 | #if defined(Z7_ZSTD_DEC_USE_ML_PLUS3) | 1316 | #if defined(Z7_ZSTD_DEC_USE_ML_PLUS3) |
1315 | + (numSymbolsMax == NUM_ML_SYMBOLS ? MATCH_LEN_MIN : 0) | 1317 | + (numSymbolsMax == NUM_ML_SYMBOLS ? MATCH_LEN_MIN : 0) |