aboutsummaryrefslogtreecommitdiff
path: root/src/lzma/args.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2008-06-18 18:02:10 +0300
committerLasse Collin <lasse.collin@tukaani.org>2008-06-18 18:02:10 +0300
commit7d17818cec8597f847b0a2537fde991bbc3d9e96 (patch)
tree9c41502e3eb96f103fe98e13456b382fbba7a292 /src/lzma/args.c
parentUpdate the file format specification draft. The new one is (diff)
downloadxz-7d17818cec8597f847b0a2537fde991bbc3d9e96.tar.xz
Update the code to mostly match the new simpler file format
specification. Simplify things by removing most of the support for known uncompressed size in most places. There are some miscellaneous changes here and there too. The API of liblzma has got many changes and still some more will be done soon. While most of the code has been updated, some things are not fixed (the command line tool will choke with invalid filter chain, if nothing else). Subblock filter is somewhat broken for now. It will be updated once the encoded format of the Subblock filter has been decided.
Diffstat (limited to 'src/lzma/args.c')
-rw-r--r--src/lzma/args.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/lzma/args.c b/src/lzma/args.c
index 4393a6bd..a4764032 100644
--- a/src/lzma/args.c
+++ b/src/lzma/args.c
@@ -52,8 +52,7 @@ static size_t filter_count = 0;
enum {
- OPT_COPY = INT_MIN,
- OPT_SUBBLOCK,
+ OPT_SUBBLOCK = INT_MIN,
OPT_X86,
OPT_POWERPC,
OPT_IA64,
@@ -97,7 +96,6 @@ static const struct option long_opts[] = {
{ "compress", no_argument, NULL, 'z' },
// Filters
- { "copy", no_argument, NULL, OPT_COPY },
{ "subblock", optional_argument, NULL, OPT_SUBBLOCK },
{ "x86", no_argument, NULL, OPT_X86 },
{ "bcj", no_argument, NULL, OPT_X86 },
@@ -267,10 +265,6 @@ parse_real(int argc, char **argv)
// Filter setup
- case OPT_COPY:
- add_filter(LZMA_FILTER_COPY, NULL);
- break;
-
case OPT_SUBBLOCK:
add_filter(LZMA_FILTER_SUBBLOCK, optarg);
break;
@@ -314,8 +308,6 @@ parse_real(int argc, char **argv)
static const char *types[] = {
"auto",
"native",
- "single",
- "multi",
"alone",
// "gzip",
NULL
@@ -471,18 +463,6 @@ set_compression_settings(void)
my_exit(ERROR);
}
- // Optimize the filter chain a little by removing all
- // Copy filters.
- for (size_t i = 0; opt_filters[i].id != LZMA_VLI_VALUE_UNKNOWN; ++i) {
- while (opt_filters[i].id == LZMA_FILTER_COPY) {
- size_t j = i;
- do {
- opt_filters[j] = opt_filters[j + 1];
- } while (opt_filters[++j].id
- != LZMA_VLI_VALUE_UNKNOWN);
- }
- }
-
const uint32_t memory_limit = opt_memory / (1024 * 1024) + 1;
uint32_t memory_usage = lzma_memory_usage(opt_filters, true);