diff options
Diffstat (limited to '')
-rw-r--r-- | debug/full_flush.c | 6 | ||||
-rw-r--r-- | debug/known_sizes.c | 2 | ||||
-rw-r--r-- | debug/memusage.c | 2 | ||||
-rw-r--r-- | debug/sync_flush.c | 10 |
4 files changed, 10 insertions, 10 deletions
diff --git a/debug/full_flush.c b/debug/full_flush.c index 3c914549..71106b56 100644 --- a/debug/full_flush.c +++ b/debug/full_flush.c @@ -75,17 +75,17 @@ main(int argc, char **argv) // Config lzma_options_lzma opt_lzma; - if (lzma_lzma_preset(&opt_lzma, 0)) { + if (lzma_lzma_preset(&opt_lzma, 1)) { fprintf(stderr, "preset failed\n"); exit(1); } - lzma_filter filters[LZMA_BLOCK_FILTERS_MAX + 1]; + lzma_filter filters[LZMA_FILTERS_MAX + 1]; filters[0].id = LZMA_FILTER_LZMA2; filters[0].options = &opt_lzma; filters[1].id = LZMA_VLI_UNKNOWN; // Init - if (lzma_stream_encoder(&strm, filters, LZMA_CHECK_SHA256) != LZMA_OK) { + if (lzma_stream_encoder(&strm, filters, LZMA_CHECK_CRC32) != LZMA_OK) { fprintf(stderr, "init failed\n"); exit(1); } diff --git a/debug/known_sizes.c b/debug/known_sizes.c index ef7472de..75ac813c 100644 --- a/debug/known_sizes.c +++ b/debug/known_sizes.c @@ -48,7 +48,7 @@ main(void) // Filter setup lzma_options_lzma opt_lzma; - if (lzma_lzma_preset(&opt_lzma, 0)) + if (lzma_lzma_preset(&opt_lzma, 1)) return 1; lzma_filter filters[] = { diff --git a/debug/memusage.c b/debug/memusage.c index 2dbb39e0..716dc8b5 100644 --- a/debug/memusage.c +++ b/debug/memusage.c @@ -26,7 +26,7 @@ main(void) lzma_init(); lzma_options_lzma lzma = { - .dict_size = (1U << 27) + (1U << 26), + .dict_size = (1U << 30) + (1U << 29), .lc = 3, .lp = 0, .pb = 2, diff --git a/debug/sync_flush.c b/debug/sync_flush.c index a161ca31..19fbef53 100644 --- a/debug/sync_flush.c +++ b/debug/sync_flush.c @@ -87,7 +87,7 @@ main(int argc, char **argv) }; lzma_options_delta opt_delta = { - .distance = 16 + .dist = 16 }; lzma_options_subblock opt_subblock = { @@ -102,7 +102,7 @@ main(int argc, char **argv) opt_subblock.subfilter_options.id = LZMA_FILTER_DELTA; opt_subblock.subfilter_options.options = &opt_delta; - lzma_filter filters[LZMA_BLOCK_FILTERS_MAX + 1]; + lzma_filter filters[LZMA_FILTERS_MAX + 1]; filters[0].id = LZMA_FILTER_LZMA2; filters[0].options = &opt_lzma; filters[1].id = LZMA_VLI_UNKNOWN; @@ -114,20 +114,20 @@ main(int argc, char **argv) } // Encoding -/* + encode(0, LZMA_SYNC_FLUSH); encode(6, LZMA_SYNC_FLUSH); encode(0, LZMA_SYNC_FLUSH); encode(7, LZMA_SYNC_FLUSH); encode(0, LZMA_SYNC_FLUSH); encode(0, LZMA_FINISH); -*/ +/* encode(53, LZMA_SYNC_FLUSH); // opt_lzma.literal_context_bits = 2; // opt_lzma.literal_pos_bits = 1; // opt_lzma.pos_bits = 0; encode(404, LZMA_FINISH); - +*/ // Clean up lzma_end(&strm); |