diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2008-08-28 22:53:15 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2008-08-28 22:53:15 +0300 |
commit | 3b34851de1eaf358cf9268922fa0eeed8278d680 (patch) | |
tree | 7bab212af647541df64227a8d350d17a2e789f6b /debug/sync_flush.c | |
parent | Fix test_filter_flags to match the new restriction of lc+lp. (diff) | |
download | xz-3b34851de1eaf358cf9268922fa0eeed8278d680.tar.xz |
Sort of garbage collection commit. :-| Many things are still
broken. API has changed a lot and it will still change a
little more here and there. The command line tool doesn't
have all the required changes to reflect the API changes, so
it's easy to get "internal error" or trigger assertions.
Diffstat (limited to '')
-rw-r--r-- | debug/sync_flush.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/debug/sync_flush.c b/debug/sync_flush.c index 03dfdd7d..eb6efef4 100644 --- a/debug/sync_flush.c +++ b/debug/sync_flush.c @@ -79,9 +79,10 @@ main(int argc, char **argv) .literal_pos_bits = LZMA_LITERAL_POS_BITS_DEFAULT, .pos_bits = LZMA_POS_BITS_DEFAULT, .preset_dictionary = NULL, - .mode = LZMA_MODE_BEST, + .persistent = true, + .mode = LZMA_MODE_NORMAL, .fast_bytes = 32, - .match_finder = LZMA_MF_BT3, + .match_finder = LZMA_MF_HC3, .match_finder_cycles = 0, }; @@ -101,24 +102,31 @@ main(int argc, char **argv) opt_subblock.subfilter_options.id = LZMA_FILTER_DELTA; opt_subblock.subfilter_options.options = &opt_delta; - lzma_options_filter filters[LZMA_BLOCK_FILTERS_MAX + 1]; - filters[0].id = LZMA_FILTER_LZMA; + lzma_filter filters[LZMA_BLOCK_FILTERS_MAX + 1]; + filters[0].id = LZMA_FILTER_LZMA2; filters[0].options = &opt_lzma; filters[1].id = LZMA_VLI_VALUE_UNKNOWN; // Init - if (lzma_stream_encoder(&strm, filters, LZMA_CHECK_NONE) != LZMA_OK) { + if (lzma_stream_encoder(&strm, filters, LZMA_CHECK_CRC32) != LZMA_OK) { fprintf(stderr, "init failed\n"); exit(1); } // Encoding +/* encode(0, LZMA_SYNC_FLUSH); encode(6, LZMA_SYNC_FLUSH); encode(0, LZMA_SYNC_FLUSH); - encode(6, 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); |