build macro ZSTD_DECODER_INTERNAL_BUFFER
just to make the topic more accessible for potential users.
This commit is contained in:
+5
-5
@@ -155,11 +155,11 @@ The file structure is designed to make this selection manually achievable for an
|
|||||||
- The build macro `ZSTD_NO_INTRINSICS` can be defined to disable all explicit intrinsics.
|
- The build macro `ZSTD_NO_INTRINSICS` can be defined to disable all explicit intrinsics.
|
||||||
Compiler builtins are still used.
|
Compiler builtins are still used.
|
||||||
|
|
||||||
- The build macro `ZSTD_LITBUFFEREXTRASIZE` can be set to control the amount of extra memory used
|
- The build macro `ZSTD_DECODER_INTERNAL_BUFFER` can be set to control
|
||||||
during decompression to store literals. This defaults to 64kB. Reducing it can reduce the
|
the amount of extra memory used during decompression to store literals.
|
||||||
memory footprint required for decompression by increasing the portion of the literal buffer that
|
This defaults to 64kB. Reducing this value reduces the memory footprint of
|
||||||
is stored in the unwritten portion of the dst buffer, at the cost of performance impact for
|
`ZSTD_DCtx` decompression contexts,
|
||||||
decompression.
|
but might also result in a small decompression speed cost.
|
||||||
|
|
||||||
|
|
||||||
#### Windows : using MinGW+MSYS to create DLL
|
#### Windows : using MinGW+MSYS to create DLL
|
||||||
|
|||||||
@@ -106,10 +106,15 @@ typedef struct {
|
|||||||
size_t ddictPtrCount;
|
size_t ddictPtrCount;
|
||||||
} ZSTD_DDictHashSet;
|
} ZSTD_DDictHashSet;
|
||||||
|
|
||||||
#ifndef ZSTD_LITBUFFEREXTRASIZE
|
#ifndef ZSTD_DECODER_INTERNAL_BUFFER
|
||||||
#define ZSTD_LITBUFFEREXTRASIZE (1 << 16) /* extra buffer reduces amount of dst required to store litBuffer */
|
# define ZSTD_DECODER_INTERNAL_BUFFER (1 << 16)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define ZSTD_LBMAX (128 << 10)
|
||||||
|
|
||||||
|
/* extra buffer, compensates amount of dst required to store litBuffer */
|
||||||
|
#define ZSTD_LITBUFFEREXTRASIZE MIN(ZSTD_DECODER_INTERNAL_BUFFER, ZSTD_LBMAX)
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
ZSTD_not_in_dst = 0, /* Stored entirely within litExtraBuffer */
|
ZSTD_not_in_dst = 0, /* Stored entirely within litExtraBuffer */
|
||||||
ZSTD_in_dst = 1, /* Stored entirely within dst (in memory after current output write) */
|
ZSTD_in_dst = 1, /* Stored entirely within dst (in memory after current output write) */
|
||||||
|
|||||||
Reference in New Issue
Block a user