diff options
author | Yann Collet <cyan@fb.com> | 2019-04-15 18:09:56 (GMT) |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2019-04-15 18:09:56 (GMT) |
commit | 474c17cdc4f4704745e1337f88066e9bd88a3eb0 (patch) | |
tree | 177e28c4fa2ce4eea352a9e99627204e98999fe3 /lib/lz4.c | |
parent | 799112b8120a02aa5646e5b604105148cc1308ba (diff) | |
download | lz4-474c17cdc4f4704745e1337f88066e9bd88a3eb0.zip lz4-474c17cdc4f4704745e1337f88066e9bd88a3eb0.tar.gz lz4-474c17cdc4f4704745e1337f88066e9bd88a3eb0.tar.bz2 |
unified limitedOutput_directive
between lz4.c and lz4hc.c .
was left in a strange state after the "amalgamation" patch.
Now only 3 directives remain,
same name across both implementations,
single definition place.
Might allow some light simplification due to reduced nb of states possible.
Diffstat (limited to 'lib/lz4.c')
-rw-r--r-- | lib/lz4.c | 31 |
1 files changed, 15 insertions, 16 deletions
@@ -32,14 +32,6 @@ - LZ4 source repository : https://github.com/lz4/lz4 */ -/* - * LZ4_SRC_INCLUDED: - * Amalgamation flag, whether lz4.c is included - */ -#ifndef LZ4_SRC_INCLUDED -# define LZ4_SRC_INCLUDED 1 -#endif - /*-************************************ * Tuning parameters **************************************/ @@ -98,6 +90,14 @@ /*-************************************ * Dependency **************************************/ +/* + * LZ4_SRC_INCLUDED: + * Amalgamation flag, whether lz4.c is included + */ +#ifndef LZ4_SRC_INCLUDED +# define LZ4_SRC_INCLUDED 1 +#endif + #define LZ4_STATIC_LINKING_ONLY #define LZ4_DISABLE_DEPRECATE_WARNINGS /* due to LZ4_decompress_safe_withPrefix64k */ #include "lz4.h" @@ -177,7 +177,7 @@ /*-************************************ -* Basic Types +* Types **************************************/ #if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) # include <stdint.h> @@ -202,6 +202,12 @@ typedef size_t reg_t; /* 32-bits in x32 mode */ #endif +typedef enum { + notLimited = 0, + limitedOutput = 1, + fillOutput = 2, +} limitedOutput_directive; + /*-************************************ * Reading and writing into memory @@ -549,13 +555,6 @@ static const U32 LZ4_skipTrigger = 6; /* Increase this value ==> compression ru /*-************************************ * Local Structures and types **************************************/ -typedef enum { - noLimit = 0, - notLimited = 1, - limitedOutput = 2, - fillOutput = 3, - limitedDestSize = 4 -} limitedOutput_directive; typedef enum { clearedTable = 0, byPtr, byU32, byU16 } tableType_t; /** |