aboutsummaryrefslogtreecommitdiff
path: root/C/Ppmd.h
diff options
context:
space:
mode:
authorIgor Pavlov <87184205+ip7z@users.noreply.github.com>2023-06-21 00:00:00 +0000
committerIgor Pavlov <87184205+ip7z@users.noreply.github.com>2023-12-17 14:59:19 +0500
commit5b39dc76f1bc82f941d5c800ab9f34407a06b53a (patch)
treefe5e17420300b715021a76328444088d32047963 /C/Ppmd.h
parent93be7d4abfd4233228f58ee1fbbcd76d91be66a4 (diff)
download7zip-5b39dc76f1bc82f941d5c800ab9f34407a06b53a.tar.gz
7zip-5b39dc76f1bc82f941d5c800ab9f34407a06b53a.tar.bz2
7zip-5b39dc76f1bc82f941d5c800ab9f34407a06b53a.zip
23.0123.01
Diffstat (limited to 'C/Ppmd.h')
-rw-r--r--C/Ppmd.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/C/Ppmd.h b/C/Ppmd.h
index b198792..66b2626 100644
--- a/C/Ppmd.h
+++ b/C/Ppmd.h
@@ -1,9 +1,9 @@
1/* Ppmd.h -- PPMD codec common code 1/* Ppmd.h -- PPMD codec common code
22021-04-13 : Igor Pavlov : Public domain 22023-03-05 : Igor Pavlov : Public domain
3This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ 3This 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
55typedef struct 57typedef struct