summaryrefslogtreecommitdiffstats
path: root/src/liblzma/rangecoder/range_common.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-15 09:41:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-15 09:41:35 +0000
commit2ed1dcfa30b3967f7d6df74fba78ce23ed065497 (patch)
tree8ff5a74b07bf976cd88df2460e1c9cafb27f050a /src/liblzma/rangecoder/range_common.h
parentReleasing progress-linux version 5.6.1+really5.4.5-1~progress7.99u1. (diff)
downloadxz-utils-2ed1dcfa30b3967f7d6df74fba78ce23ed065497.tar.xz
xz-utils-2ed1dcfa30b3967f7d6df74fba78ce23ed065497.zip
Merging upstream version 5.6.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/liblzma/rangecoder/range_common.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/liblzma/rangecoder/range_common.h b/src/liblzma/rangecoder/range_common.h
index 2c74dc1..ac4dbe1 100644
--- a/src/liblzma/rangecoder/range_common.h
+++ b/src/liblzma/rangecoder/range_common.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file range_common.h
@@ -6,15 +8,15 @@
// Authors: Igor Pavlov
// Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#ifndef LZMA_RANGE_COMMON_H
#define LZMA_RANGE_COMMON_H
-#include "common.h"
+// Skip common.h if building price_tablegen.c.
+#ifndef BUILDING_PRICE_TABLEGEN
+# include "common.h"
+#endif
///////////////
@@ -66,6 +68,10 @@
///
/// I will be sticking to uint16_t unless some specific architectures
/// are *much* faster (20-50 %) with uint32_t.
+///
+/// Update in 2024: The branchless C and x86-64 assembly was written so that
+/// probability is assumed to be uint16_t. (In contrast, LZMA SDK 23.01
+/// assembly supports both types.)
typedef uint16_t probability;
#endif