diff options
author | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2023-06-21 00:00:00 +0000 |
---|---|---|
committer | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2023-12-17 14:59:19 +0500 |
commit | 5b39dc76f1bc82f941d5c800ab9f34407a06b53a (patch) | |
tree | fe5e17420300b715021a76328444088d32047963 /C/Ppmd.h | |
parent | 93be7d4abfd4233228f58ee1fbbcd76d91be66a4 (diff) | |
download | 7zip-5b39dc76f1bc82f941d5c800ab9f34407a06b53a.tar.gz 7zip-5b39dc76f1bc82f941d5c800ab9f34407a06b53a.tar.bz2 7zip-5b39dc76f1bc82f941d5c800ab9f34407a06b53a.zip |
23.0123.01
Diffstat (limited to 'C/Ppmd.h')
-rw-r--r-- | C/Ppmd.h | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1,9 +1,9 @@ | |||
1 | /* Ppmd.h -- PPMD codec common code | 1 | /* Ppmd.h -- PPMD codec common code |
2 | 2021-04-13 : Igor Pavlov : Public domain | 2 | 2023-03-05 : Igor Pavlov : Public domain |
3 | This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ | 3 | This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ |
4 | 4 | ||
5 | #ifndef __PPMD_H | 5 | #ifndef ZIP7_INC_PPMD_H |
6 | #define __PPMD_H | 6 | #define ZIP7_INC_PPMD_H |
7 | 7 | ||
8 | #include "CpuArch.h" | 8 | #include "CpuArch.h" |
9 | 9 | ||
@@ -48,8 +48,10 @@ typedef struct | |||
48 | Byte Count; /* Count to next change of Shift */ | 48 | Byte Count; /* Count to next change of Shift */ |
49 | } CPpmd_See; | 49 | } CPpmd_See; |
50 | 50 | ||
51 | #define Ppmd_See_Update(p) if ((p)->Shift < PPMD_PERIOD_BITS && --(p)->Count == 0) \ | 51 | #define Ppmd_See_UPDATE(p) \ |
52 | { (p)->Summ = (UInt16)((p)->Summ << 1); (p)->Count = (Byte)(3 << (p)->Shift++); } | 52 | { if ((p)->Shift < PPMD_PERIOD_BITS && --(p)->Count == 0) \ |
53 | { (p)->Summ = (UInt16)((p)->Summ << 1); \ | ||
54 | (p)->Count = (Byte)(3 << (p)->Shift++); }} | ||
53 | 55 | ||
54 | 56 | ||
55 | typedef struct | 57 | typedef struct |