@@ -17,7 +17,7 @@ They generate and decode data using the [LZ4 block format].
1717
1818#### Level 2 : High Compression variant
1919
20- For more compression ratio at the cost of compression speed,
20+ For better compression ratio at the cost of compression speed,
2121the High Compression variant called ** lz4hc** is available.
2222Add files ** ` lz4hc.c ` ** and ** ` lz4hc.h ` ** .
2323This variant also compresses data using the [ LZ4 block format] ,
@@ -100,21 +100,45 @@ The following build macro can be selected to adjust source code behavior at comp
100100 passed as argument to become a compression state is suitably aligned.
101101 This test can be disabled if it proves flaky, by setting this value to 0.
102102
103- - ` LZ4_USER_MEMORY_FUNCTIONS ` : replace calls to ` <stdlib, h> ` 's ` malloc() ` , ` calloc() ` and ` free() `
103+ - ` LZ4_USER_MEMORY_FUNCTIONS ` : replace calls to ` <stdlib. h> ` 's ` malloc() ` , ` calloc() ` and ` free() `
104104 by user-defined functions, which must be named ` LZ4_malloc() ` , ` LZ4_calloc() ` and ` LZ4_free() ` .
105105 User functions must be available at link time.
106106
107107- ` LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION ` :
108108 Remove support of dynamic memory allocation.
109109 For more details, see description of this macro in ` lib/lz4.c ` .
110110
111+ - ` LZ4_STATIC_LINKING_ONLY_ENDIANNESS_INDEPENDENT_OUTPUT ` : experimental feature aimed at producing the same
112+ compressed output on platforms of different endianness (i.e. little-endian and big-endian).
113+ Output on little-endian platforms shall remain unchanged, while big-endian platforms will start producing
114+ the same output as little-endian ones. This isn't expected to impact backward- and forward-compatibility
115+ in any way.
116+
111117- ` LZ4_FREESTANDING ` : by setting this build macro to 1,
112118 LZ4/HC removes dependencies on the C standard library,
113119 including allocation functions and ` memmove() ` , ` memcpy() ` , and ` memset() ` .
114120 This build macro is designed to help use LZ4/HC in restricted environments
115121 (embedded, bootloader, etc).
116122 For more details, see description of this macro in ` lib/lz4.h ` .
117123
124+ - ` LZ4_HEAPMODE ` : Select how stateless compression functions like ` LZ4_compress_default() `
125+ allocate memory for their hash table,
126+ in memory stack (0: default , fastest), or in memory heap (1: requires malloc()).
127+
128+ - ` LZ4HC_HEAPMODE ` : Select how stateless HC compression functions like ` LZ4_compress_HC() `
129+ allocate memory for their workspace:
130+ in stack (0), or in heap (1: default ).
131+ Since workspace is rather large, stack can be inconvenient, hence heap mode is recommended.
132+
133+ - ` LZ4F_HEAPMODE ` : selects how ` LZ4F_compressFrame() ` allocates the compression state,
134+ either on stack (default, value 0) or using heap memory (value 1).
135+
136+
137+ #### Makefile variables
138+
139+ The following ` Makefile ` variables can be selected to alter the profile of produced binaries :
140+ - ` BUILD_SHARED ` : generate ` liblz4 ` dynamic library (enabled by default)
141+ - ` BUILD_STATIC ` : generate ` liblz4 ` static library (enabled by default)
118142
119143
120144#### Amalgamation
0 commit comments