Skip to content

Commit

Permalink
Set compression level for zstd to level 10
Browse files Browse the repository at this point in the history
This requires a good amount of saving due to larger dictionary
size with only marginal more time effort for compression. decompression
time is unaffected.
  • Loading branch information
dirkmueller authored and Conan-Kudo committed Nov 8, 2023
1 parent 59f31fc commit b6720b0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/compression_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,16 @@ typedef struct {
unsigned char buffer[XZ_BUFFER_SIZE];
} XzFile;

#define CR_CW_ZSTD_COMPRESSION_LEVEL 9

/** level 10 or 11 are good choices for the XML files that we generate.
* level 10 requires ~ 18% more time with 1% saving over level 9
* level 11 requires ~ 50% more time with 1.5% saving over level 9
* level 12 requires ~ 65% more time with 1.5% saving over level 9
* level 13 requires ~ 260% more time with 1.55% saving over level 9
*/

#define CR_CW_ZSTD_COMPRESSION_LEVEL 10

typedef struct {
void *buffer;
size_t buffer_size;
Expand Down

0 comments on commit b6720b0

Please sign in to comment.