@@ -100,21 +100,45 @@ The following build macro can be selected to adjust source code behavior at comp
100
100
passed as argument to become a compression state is suitably aligned.
101
101
This test can be disabled if it proves flaky, by setting this value to 0.
102
102
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() `
104
104
by user-defined functions, which must be named ` LZ4_malloc() ` , ` LZ4_calloc() ` and ` LZ4_free() ` .
105
105
User functions must be available at link time.
106
106
107
107
- ` LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION ` :
108
108
Remove support of dynamic memory allocation.
109
109
For more details, see description of this macro in ` lib/lz4.c ` .
110
110
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
+
111
117
- ` LZ4_FREESTANDING ` : by setting this build macro to 1,
112
118
LZ4/HC removes dependencies on the C standard library,
113
119
including allocation functions and ` memmove() ` , ` memcpy() ` , and ` memset() ` .
114
120
This build macro is designed to help use LZ4/HC in restricted environments
115
121
(embedded, bootloader, etc).
116
122
For more details, see description of this macro in ` lib/lz4.h ` .
117
123
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)
118
142
119
143
120
144
#### Amalgamation
0 commit comments