aboutsummaryrefslogtreecommitdiff
path: root/src/xz/args.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-12-22xz: Fix suffix check.Jia Tan1-8/+22
The suffix refactor done in 99575947a58a60416c570eb78038d18a1ea4cef4 had a small regression where raw format compression to standard out failed if a suffix was not set. In this case, setting the suffix did not make sense since a file is not created. Now, xz should only fail when a suffix is not provided when it is actually needed. For instance: echo "foo" | xz --format=raw --lzma2 | wc -c does not need a suffix check since it creates no files. But: xz --format=raw --lzma2 --suffix=.bar foo Needs the suffix to be set since it must create foo.bar.
2023-07-18xz: Make "%s: %s" translatable because French needs "%s : %s".Lasse Collin1-1/+4
2023-02-03xz: Refactor duplicated check for custom suffix when using --format=rawJia Tan1-0/+8
2023-02-03xz: Do not set compression settings with raw format in list mode.Jia Tan1-1/+2
Calling coder_set_compression_settings() in list mode with verbose mode on caused the filter chain and memory requirements to print. This was unnecessary since the command results in an error and not consistent with other formats like lzma and alone.
2022-12-11xz: Rename --experimental-arm64 to --arm64.Lasse Collin1-1/+1
2022-12-08xz: Make args_info.files_name a const pointer.Lasse Collin1-1/+1
2022-12-08xz: Don't modify argv[].Lasse Collin1-4/+19
The code that parses --memlimit options and --block-list modified the argv[] when parsing the option string from optarg. This was visible in "ps auxf" and such and could be confusing. I didn't understand it back in the day when I wrote that code. Now a copy is allocated when modifiable strings are needed.
2022-11-19xz: Add support --threads=+N so that -T+1 gives threaded mode.Lasse Collin1-3/+15
2022-11-14Replace the experimental ARM64 filter with a new experimental version.Lasse Collin1-1/+1
This is incompatible with the previous version. This has space/tab fixes in filter_*.c and bcj.h too.
2022-11-09xz: Remove the commented-out FORMAT_GZIP, gzip, .gz, and .tgz.Lasse Collin1-2/+0
2022-11-09xz: Add .lz (lzip) decompression support.Lasse Collin1-0/+9
If configured with --disable-lzip-decoder then --long-help will still list `lzip' in --format but I left it like that since due to translations it would be messy to have two help strings. Features are disabled only in special situations so wrong help in such a situation shouldn't matter much. Thanks to Michał Górny for the original patch.
2022-09-19xz: Add --experimental-arm64[=width=WIDTH].Lasse Collin1-0/+7
It will be renamed to --arm64 once it is stable. Man page or --long-help weren't updated yet.
2022-04-12xz: Add --memlimit-mt-decompress along with a default limit value.Lasse Collin1-7/+17
--memlimit-mt-decompress allows specifying the limit for multithreaded decompression. This matches memlimit_threading in liblzma. This limit can only affect the number of threads being used; it will never prevent xz from decompressing a file. The old --memlimit-decompress option is still used at the same time. If the value of --memlimit-decompress (the default value or one specified by the user) is less than the value of --memlimit-mt-decompress , then --memlimit-mt-decompress is reduced to match --memlimit-decompress. Man page wasn't updated yet.
2019-06-23xz: Fix some of the warnings from -Wsign-conversion.Lasse Collin1-2/+2
2019-05-11spellingAntoine Cœur1-1/+1
2015-11-03xz: Make xz buildable even when encoders or decoders are disabled.Lasse Collin1-0/+16
The patch is quite long but it's mostly about adding new #ifdefs to omit code when encoders or decoders have been disabled. This adds two new #defines to config.h: HAVE_ENCODERS and HAVE_DECODERS.
2014-08-05xz: Add --ignore-check.Lasse Collin1-0/+7
2013-07-04xz: Add preliminary support for --flush-timeout=TIMEOUT.Lasse Collin1-0/+7
When --flush-timeout=TIMEOUT is used, xz will use LZMA_SYNC_FLUSH if read() would block and at least TIMEOUT milliseconds has elapsed since the previous flush. This can be useful in realtime-like use cases where the data is simultanously decompressed by another process (possibly on a different computer). If new uncompressed input data is produced slowly, without this option xz could buffer the data for a long time until it would become decompressible from the output. If TIMEOUT is 0, the feature is disabled. This is the default. This commit affects the compression side. Using xz for the decompression side for the above purpose doesn't work yet so well because there is quite a bit of input and output buffering when decompressing. The --long-help or man page were not updated yet. The details of this feature may change.
2012-07-03xz: Add incomplete support for --block-list.Lasse Collin1-0/+78
It's broken with threads and when also --block-size is used.
2011-11-04xz: Fix a typo in a comment.Lasse Collin1-1/+1
Thanks to Bela Lubkin.
2011-04-11xz: Add support for threaded compression.Lasse Collin1-1/+2
2011-04-09xz: Minor internal changes to handling of --threads.Lasse Collin1-2/+2
Now it always defaults to one thread. Maybe this will change again if a threading method is added that doesn't affect memory usage.
2011-03-18xz: Add --block-size=SIZE.Lasse Collin1-0/+7
This uses LZMA_FULL_FLUSH every SIZE bytes of input. Man page wasn't updated yet.
2011-03-18xz: Add --single-stream.Lasse Collin1-0/+6
This can be useful when there is garbage after the compressed stream (.xz, .lzma, or raw stream). Man page wasn't updated yet.
2010-09-05xz: Use an array instead of pointer for stdin_filename.Lasse Collin1-1/+1
Thanks Joerg Sonnenberger.
2010-08-07Disable the memory usage limiter by default.Lasse Collin1-29/+58
For several people, the limiter causes bigger problems that it solves, so it is better to have it disabled by default. Those who want to have a limiter by default need to enable it via the environment variable XZ_DEFAULTS. Support for environment variable XZ_DEFAULTS was added. It is parsed before XZ_OPT and technically identical with it. The intended uses differ quite a bit though; see the man page. The memory usage limit can now be set separately for compression and decompression using --memlimit-compress and --memlimit-decompress. To set both at once, -M or --memlimit can be used. --memory was retained as a legacy alias for --memlimit for backwards compatibility. The semantics of --info-memory were changed in backwards incompatible way. Compatibility wasn't meaningful due to changes in the memory usage limiter functionality. The memory usage limiter info is no longer shown at the bottom of xz --long -help. The memory usage limiter support for removed completely from xzdec. xz's man page was updated to match the above changes. Various unrelated fixes were also made to the man page.
2010-08-06Add missing const to a global constant in xz.Lasse Collin1-1/+1
2010-06-15Add --no-adjust.Lasse Collin1-0/+6
2010-05-26Rename MIN() and MAX() to my_min() and my_max().Lasse Collin1-1/+2
This should avoid some minor portability issues.
2010-05-26Remove the Subblock filter code for now.Lasse Collin1-8/+1
The spec isn't finished and the code didn't compile anymore. It won't be included in XZ Utils 5.0.0. It's easy to get it back once the spec is done.
2010-01-26Add a missing space to an error message.Lasse Collin1-1/+1
Thanks to Robert Readman.
2010-01-24Set LC_NUMERIC=C when --robot is used.Lasse Collin1-0/+4
It is to ensure that floating point numbers will always have a dot as the decimal separator.
2009-11-25Create sparse files by default when decompressing intoLasse Collin1-0/+6
a regular file. Sparse file creation can be disabled with --no-sparse. I don't promise yet that the name of this option won't change before 5.0.0. It's possible that the code, that checks when it is safe to use sparse output on stdout, is not good enough, and a more flexible command line option is needed to configure sparse file handling.
2009-11-16Add support for --info-memory and --robot to xz.Lasse Collin1-35/+50
Currently --robot works only with --info-memory and --version. --help and --long-help work too, but --robot has no effect on them. Thanks to Jonathan Nieder for the original patches.
2009-09-19Various changes.Lasse Collin1-7/+1
Separate a few reusable components from XZ Utils specific code. The reusable code is now in "tuklib" modules. A few more could be separated still, e.g. bswap.h. Fix some bugs in lzmainfo. Fix physmem and cpucores code on OS/2. Thanks to Elbert Pol for help. Add OpenVMS support into physmem. Add a few #ifdefs to ease building XZ Utils on OpenVMS. Thanks to Jouk Jansen for the original patch.
2009-07-23Fix incorrect usage of getopt_long(), which causedLasse Collin1-1/+0
invalid memory access if XZ_OPT was defined.
2009-07-10Look for full command names instead of substringsLasse Collin1-9/+13
like "un", "cat", and "lz" when determining if xz is run as unxz, xzcat, lzma, unlzma, or lzcat. This is to ensure that if xz is renamed (e.g. via --program-transform-name), it doesn't so easily work in wrong mode.
2009-06-24Cast a char argument to isspace() to unsigned char.Lasse Collin1-2/+9
2009-05-23Remove undocumented alternative option names --bcj, --ppc,Lasse Collin1-3/+0
and --itanium.
2009-05-23Add support for specifying the BCJ filter start offsetLasse Collin1-15/+21
in the xz command line tool.
2009-05-22Add --no-warn.Lasse Collin1-1/+7
2009-05-22Remove the --info option, which was an alias for --list.Lasse Collin1-1/+0
2009-05-22If xz is run as lzma, unlzma, or lzcat, simply implyLasse Collin1-11/+6
--format=lzma. This means that xz emulating lzma doesn't decompress .xz files, while before this commit it did. The new way is slightly simpler in code and especially in upcoming documentation.
2009-05-22Make the default memory usage limit 40 % of RAM for bothLasse Collin1-7/+21
compressing and decompressing. This should be OK now that xz automatically scales down the compression settings if they would exceed the memory usage limit (earlier, the limit for compression was increased to 90 % because low limit broke scripts that used "xz -9" on systems with low RAM). Support spcifying the memory usage limit as a percentage of RAM (e.g. --memory=50%). Support --threads=0 to reset the thread limit to the default value (number of available CPU cores). Use UINT32_MAX instead of SIZE_MAX as the maximum in args.c. hardware.c was already expecting uint32_t value. Cleaned up the output of --help and --long-help.
2009-04-13Put the interesting parts of XZ Utils into the public domain.Lasse Collin1-10/+3
Some minor documentation cleanups were made at the same time.
2009-02-14Cleanups to the code that detects the amount of RAM andLasse Collin1-2/+2
the number of CPU cores. Added support for using sysinfo() on Linux systems whose libc lacks appropriate sysconf() support (at least dietlibc). The Autoconf macros were split into separate files, and CPU core count detection was moved from hardware.c to cpucores.h. The core count isn't used for anything real for now, so a problematic part in process.c was commented out.
2009-02-13Fix handling of integrity check type in the xz command line tool.Lasse Collin1-1/+8
2009-02-13Improve support for DOS-like systems.Lasse Collin1-8/+5
Here DOS-like means DOS, Windows, and OS/2.
2009-02-08Support both slash and backslash as path componentLasse Collin1-0/+9
separator on Windows when parsing argv[0].
2008-12-27Some xz command line tool improvements.Lasse Collin1-13/+10
2008-11-19Renamed lzma to xz and lzmadec to xzdec. We create symlinksLasse Collin1-0/+500
lzma, unlzma, and lzcat in "make install" for backwards compatibility with LZMA Utils 4.32.x; I'm not sure if this should be the default though.