Age | Commit message (Collapse) | Author | Files | Lines |
|
I had somehow thought that N_() is usually used
as shorthand for ngettext().
This also fixes a missing \n from a call to ngettext().
|
|
|
|
|
|
Thanks to Joerg Sonnenberger.
|
|
Thanks Joerg Sonnenberger.
|
|
|
|
|
|
|
|
This should reduce the cases where --extreme makes
compression worse. On the other hand, some other
files may now benefit slightly less from --extreme.
|
|
|
|
Testing compression at level -4 now requires 48 MiB of free store at
compression time and 5 MiB at decompression time.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
|
|
|
|
"Extreme" mode might need some further tweaking still.
Docs were not updated yet.
|
|
It was 8 + nice_len / 4, now it is 4 + nice_len / 4.
This allows faster settings at lower nice_len values,
even though it seems that I won't use automatic depth
calcuation with HC3 and HC4 in the presets.
|
|
At least for now, the --help option doesn't list any
options that take arguments, so "Mandatory arguments to..."
can be omitted.
|
|
This is more logical behavior than ignoring preset level
options once a custom filter chain has been specified.
|
|
|
|
It broke when --memory option was removed from xzdec.
Thanks to Jonathan Nieder.
|
|
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.
|
|
|
|
Thanks to A. Costa and Jonathan Nieder.
|
|
|
|
|
|
|
|
|
|
Hopefully these help a bit when learning the basics
of liblzma API. I plan to write detailed examples about
both basic and advanced features with lots of comments,
but these two examples are good have right now.
The examples were written by Daniel Mealha Cabrita. Thanks.
|
|
|
|
|
|
Thanks to Denis Excoffier.
|
|
Thanks to Denis Excoffier for the bug report.
|
|
|
|
|
|
When using -O2 with GCC, it liked to swap two comparisons
in one "if" statement. It's otherwise fine except that
the latter part, which is seemingly never executed, got
executed (nothing wrong with that) and then triggered
warning in Valgrind about conditional jump depending on
uninitialized variable. A few people find this annoying
so do things a bit differently to avoid the warning.
|
|
|
|
I want to get a bug report if something else than
DJGPP lacks SA_RESTART.
|
|
- Concatenating .xz files and padding
- List mode
- Robot mode
- A few examples (but many more are needed)
|
|
|
|
|
|
|
|
|
|
This change is no-op, but good to have just in case
for the future.
|
|
Thanks to Jonathan Nieder.
|
|
Thanks to Jonathan Nieder for the reminder.
|
|
This should have been done in
920a69a8d8e4203c5edddd829d932130eac188ea.
|
|
This should avoid some minor portability issues.
|
|
|
|
|
|
|
|
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.
|
|
message_filters_to_str() converts the filter chain to
a string. message_filters_show() replaces the original
message_filters().
uint32_to_optstr() was also added to show the dictionary
size in nicer format when possible.
|
|
It isn't really useful so omitting it makes things
shorter and slightly more readable.
|
|
|
|
|
|
Don't use #error to generate compile error, because some
compilers actually don't take it as an error. This fixes
tuklib_physmem on IRIX.
Fix incorrect error check for sysconf() return values.
Add AIX, HP-UX, and Tru64 specific code to detect the
amount RAM.
Add HP-UX specific code to detect the number of CPU cores.
Thanks a lot to Peter O'Gorman for initial patches,
testing, and debugging these fixes.
|
|
The extra space for showing both has been taken from the
sizes field. If the sizes grow big, bigger units than MiB
will be used. It makes it slightly difficult to see that
progress is still happening with huge files, but it should
be OK in practice.
Thanks to Trent W. Buck for <http://bugs.debian.org/574583>
and Jonathan Nieder for suggestions how to fix it.
|
|
Thanks to Gilles Espinasse.
|
|
|
|
Thanks to someone who reported the bug on IRC.
|
|
Originally both base-2 and base-10 were supported, but since
there seems to be little need for base-10 in XZ Utils, treat
everything as base-2 and also be more relaxed about the case
of the first letter of the suffix. Now xz will accept e.g.
KiB, Ki, k, K, kB, and KB, and interpret them all as 1024. The
recommended spelling of the suffixes are still KiB, MiB, and GiB.
|
|
It still feels a bit wrong to round 1 byte to 1 MiB but
at least it is now done consistently so that the same
byte value is always rounded the same way to MiB.
|
|
This is to allow files created with "xz -9" to be decompressed
if the amount of RAM cannot be determined.
|
|
Previously the default limit was always 40 % of RAM. The
new limit is a little bit more complex:
- If 40 % of RAM is at least 80 MiB, 40 % of RAM is used
as the limit.
- If 80 % of RAM is over 80 MiB, 80 MiB is used as the limit.
- Otherwise 80 % of RAM is used as the limit.
This should make it possible to decompress files created with
"xz -9" on more systems. Swapping is generally more expected
on systems with less RAM, so higher default limit on them
shouldn't cause too bad surprises in terms of heavy swapping.
Instead, the higher default limit should reduce the number of
bad surprises when it used to prevent decompression of files
created with "xz -9". The DoS prevention system shouldn't be
a DoS itself.
Note that even with the new default limit, a system with 64 MiB
RAM cannot decompress files created with "xz -9" without user
overriding the limit. This should be OK, because if xz is going
to need more memory than the system has RAM, it will run very
very slowly and thus it's good that user has to override the limit
in that case.
|
|
|
|
With bad luck, lzma_code() could return LZMA_BUF_ERROR
when it shouldn't.
This has been here since the early days of liblzma.
It got triggered by the modifications made to the xz
tool in commit 18c10c30d2833f394cd7bce0e6a821044b15832f
but only when decompressing .lzma files. Somehow I managed
to miss testing that with Valgrind earlier.
This fixes <http://bugs.gentoo.org/show_bug.cgi?id=305591>.
Thanks to Rafał Mużyło for helping to debug it on IRC.
|
|
Thanks to Jonathan Nieder.
|
|
|
|
This allows the files to work on HURD.
Thanks to Jonathan Nieder.
|
|
lzma_block.version has to be initialized even for
lzma_block_header_decode(). This way a future version
of liblzma won't allocate memory in a way that an old
application doesn't know how to free it.
The subtlety of this change is that all current apps
using lzma_block_header_decode() will keep working for
now, because the only possible version value is zero,
and lzma_block_header_decode() unconditionally sets the
version to zero even now. Unless fixed, these apps will
break in the future if a new version of the Block options
is ever needed.
|
|
This was added in 455e68c030fde8a8c2f5e254c3b3ab9489bf3735.
|
|
|
|
|
|
|
|
xz --force accepted symlinks, but didn't remove
them after successful compression. Instead, an error
message was displayed.
|
|
|
|
|
|
|
|
|
|
|
|
The old Makefile + config.h was deleted, because it
becomes outdated too easily and building with the
Autotools based build system works fine even on Windows.
windows/build.sh hasn't got much testing, but it should
work to build 32-bit x86 and x86-64 versions of XZ Utils
using MSYS, MinGW or MinGW-w32, and MinGW-w64.
windows/INSTALL-Windows.txt describes what packages are
needed and how to install them.
windows/README-Windows.txt is a readme file for the binary
package that build.sh hopefully builds.
There are no instructions about using Autotools for now,
so those using a git snapshot may want to run
"autoreconf -fi && ./configure && make mydist" on a UN*X
box and then copy the resulting .tar.gz to a Windows.
|
|
Previously it was set statically to CRC64 or CRC32
depending on options passed to the configure script.
|
|
|
|
If signal handlers haven't been established, then it's
useless to try to block them, especially since the sigset_t
used for blocking hasn't been initialized yet.
|
|
The opening of the destination file is now delayed a little.
The coder is initialized, and if decompressing, the memory
usage of the first Block compared against the memory
usage limit before the destination file is opened. This
means that if --force was used, the old "target" file won't
be deleted so easily when something goes wrong very early.
Thanks to Mark K for the bug report.
The above fix required some changes to progress message
handling. Now there is a separate function for setting and
printing the filename. It is used also in list.c.
list_file() now handles stdin correctly (gives an error).
A useless check for user_abort was removed from file_io.c.
|
|
This should have been already in
0bc9eab243dee3be764b3530433a7fcdc3f7c6a1.
|
|
|
|
|
|
|
|
Thanks to Robert Readman.
|
|
Added a note to translators too.
Thanks to Robert Readman.
|
|
This was introduced in
0dd6d007669b946543ca939a44243833c79e08f4 two days ago.
|
|
|
|
This is a bit rough but should be useful for basic things.
Ideas (with detailed examples) about the output format are
welcome.
The output of --robot --list is not necessarily stable yet,
although I don't currently have any plans about changing it.
The man page hasn't been updated yet.
|
|
It will be used by --list.
|
|
It is to ensure that floating point numbers
will always have a dot as the decimal separator.
|
|
|
|
Thanks to R. Bijker.
|
|
Thanks to Dan Shechter for the patch.
It is likely that windows/Makefile will be removed
completely, because Autotols based build nowadays
works well with both 32-bit and 64-bit MinGW (I
just need to update the docs).
|
|
|
|
to a terminal even if --force is specified.
It just seems more reasonable this way.
The new behavior matches bzip2. The old one matched gzip.
|
|
to stdout even if --force is used.
--force will still enable compression of symlinks, but only
in case they point to a regular file.
The new way simply seems more reasonable. It matches gzip's
behavior while the old one matched bzip2's behavior.
|
|
|
|
This is untested but it will get tested soon and, if needed,
fixed before 5.0.0.
Thanks to Stuart Shelton.
|
|
This affects lzma_memusage() and lzma_memlimit_get().
|
|
This breaks API and ABI but most apps are not affected
since most apps don't use this part of the API. You will
get a compile error if you are using anything that got
broken.
Summary of changes:
- Ability to store Stream Flags, which are needed
for random-access reading in multi-Stream files.
- Separate function to set size of Stream Padding.
- Iterator structure makes it possible to read the same
lzma_index from multiple threads at the same time.
- A lot faster code to locate Blocks.
- Removed lzma_index_equal() without adding anything
to replace it. I don't know what it should do exactly
with the new features and what actually needs this
function in the first place other than test_index.c,
which now has its own code to compare lzma_indexes.
|
|
It was fixed in the C code earlier.
|
|
|
|
|
|
Since the *.gmo files are deleted by the maintainer-clean target,
I assume they are not meant to be tracked.
Also add the other files listed in the Makefile’s clean targets
(stamp-poT, xz.po, xz.[12].po, *.new.po, xz.mo) to make sure they
are not accidentally tracked. Most of these are intermediate
files that would not appear unless a build is interrupted or
fails.
Split the list of untracked files by origin to make it easier to
tell if files are missing in the future.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
|
|
I understood that this is nicer, because then people
don't need to worry about the LZMA_API_STATIC macro.
Thanks to Charles Wilson and Keith Marshall.
|
|
The problem was introduced when adding sparse file
support in 465d1b0d6518c5d980f2db4c2d769f9905bdd902.
Thanks to Charles Wilson.
|
|
Thanks to Marek Černocký.
Other people planning to translate xz: Note that the
messages are a little bit in flux still. Translations
are still welcome, just be prepared to some extra work
in case there are changes.
|
|
for translation bugs.
|
|
Thanks to Marek Černocký.
|
|
Fix a missing _() in the error message too.
|
|
Thanks to Jonathan Nieder.
|
|
This was introduced in
bd13b04e202b6f495a68eb0766f97085b7c50a06.
Thanks to Jim Meyering for noticing it.
|
|
With bad luck this could cause a segfault due to
reading (but not writing) past the end of the buffer.
|
|
lzma_index_read() didn't skip over Stream Padding
if it was the first record in the Index.
lzma_index_cat() didn't combine small Indexes correctly.
The test suite was updated to check for these bugs.
These bugs didn't affect the xz command line tool or
most users of liblzma in any way.
|
|
The Index decoder code didn't perfectly match the API docs,
which said that *i will be set to point to the decoded Index
only after decoding has succeeded. The docs were a bit unclear
too.
Now the decoder will initially set *i to NULL. *i will be set
to point to the decoded Index once decoding has succeeded.
This simplifies applications too, since it avoids dangling
pointers.
|
|
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.
|
|
|
|
|
|
on that operating system.
I'm too lazy to think how to make a good Autoconf test
for this and it's not that important anyway.
No longer define HAVE_ASM_X86 or HAVE_ASM_X86_64.
Inline assembler (if any) is used if a macro like
__i386__ or __x86_64__ is defined.
|
|
when --enable-small has been specified.
|
|
Thanks to Joachim Henke for the original patch.
|
|
which now use AC_CACHE_CHECK. Using the cache variable,
configure now warns if there is no method to detect the amount
of RAM and recommends using --enable-assume-ram.
|
|
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.
|
|
in the text editor.
|
|
I had hoped to keep liblzma as purely a compression
library as possible (e.g. file I/O will go into
a different library), but it seems that applications
linking agaisnt liblzma need some way to determine
the memory usage limit, and knowing the amount of RAM
is one reasonable way to help making such decisions.
Thanks to Jonathan Nieder for the original patch.
|
|
|
|
|
|
|
|
|
|
Originally the idea was that using LZMA_FULL_FLUSH
with Stream encoder would read the filter chain
from the same array that was used to intialize the
Stream encoder. Since most apps wouldn't use
LZMA_FULL_FLUSH, most apps wouldn't need to keep
the filter chain available after initializing the
Stream encoder. However, due to my mistake, it
actually required keeping the array always available.
Since setting the new filter chain via the array
used at initialization time is not a nice way to do
it for a couple of reasons, this commit ditches it
and introduces lzma_filters_update(). This new function
replaces also the "persistent" flag used by LZMA2
(and to-be-designed Subblock filter), which was also
an ugly thing to do.
Thanks to Alexey Tourbin for reminding me about the problem
that Stream encoder used to require keeping the filter
chain allocated.
|
|
It was meant to be lzma_filters_copy(), not lzma_filters_dup().
|
|
This will be needed internally by liblzma once I fix
a design mistake in the encoder API. This function may
be useful to applications too so it's good to export it.
|
|
A minus sign is larger, easier to see in a printout, and more
likely to use the same glyph as ASCII hyphen-minus in a terminal
than a hyphen. Since broken manual pagers do not find hyphens
when the user searches for a hyphen-minus, minus signs are also
easier to search for. So use minus signs instead of hyphens to
render sample terminal output.
|
|
the man page though.
Thanks to Jim Meyering for noticing this.
|
|
This replaces bswap.h and integer.h.
The tuklib module uses <byteswap.h> on GNU,
<sys/endian.h> on *BSDs and <sys/byteorder.h>
on Solaris, which may contain optimized code
like inline assembly.
|
|
|
|
in lz_encoder_hash.h.
|
|
Seems that it is a problem in some cases if the same
version of XZ Utils produces different output on different
endiannesses, so this commit fixes that problem. The output
will still vary between different XZ Utils versions, but I
cannot avoid that for now.
This commit bloatens the code on big endian systems by 1 KiB,
which should be OK since liblzma is bloated already. ;-)
|
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
Thanks to Markus Duft for the patch.
|
|
Thanks to Jouk Jansen.
|
|
|
|
Thanks to Jouk Jansen.
|
|
Thanks to Jouk Jansen.
|
|
Thanks to Charles Wilson.
|
|
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.
|
|
|
|
|
|
|
|
Thanks to Christian Weisgerber for pointing out some of these.
|
|
|
|
|
|
This fixes "make install" on operating systems using
a suffix for executables.
Cygwin is treated specially. The symlink names won't have
.exe suffix even though the executables themselves have.
Thanks to Charles Wilson.
|
|
|
|
Also move DJGPP-specific code near the code meant
for other DOS-like systems.
|
|
|
|
the function call succeeded.
NetBSD 4.0 returns positive values on success, but
NetBSD Current and FreeBSD return zero. OpenBSD's
man page doesn't tell what sysctl() returns on
success. All these BSDs return -1 on error.
Thanks to Robert Elz and Thomas Klausner.
|
|
|
|
|
|
xz used to reject "xz --lzma2=pb=2," while
"xz --lzma2=pb=2,," worked. Now both work.
|
|
|
|
and use a fix that works on all systems using
GNU assembler.
Maybe the assembler code is used e.g. on Solaris x86
but let's worry about it if this doesn't work on it.
|
|
|
|
|
|
Seems that in addition on Windows and DOS, also OpenBSD
lacks support for %'d style printf() format strings.
So far that is the only modern POSIX-like system I know
with this problem, but after this hack, the thousand
separator shouldn't be a problem on any system.
Maybe testing if a format string like %'d produces
reasonable output is invoking undefined behavior on some
systems, but so far all the problematic systems I've tried
just print the raw format string (e.g. %'d prints 'd).
Maybe Autoconf test would have been better, but this
hack works also for cross-compilation, and avoids
recompilation in case the system libc starts to support
the thousand separator.
|
|
|
|
This fixes build on *BSDs and Darwin.
Thanks to Jukka Salmi for the patches.
Richard Koch reported the problem too.
|
|
Thanks to Karl Berry.
|
|
|
|
|
|
6a2eb54092fc625d59921a607ff68cd1a90aa898 and
71f18e8a066a01dda0c8e5508b135ef104e43e4c required
some changes that weren't applied in debug.
|
|
|
|
|
|
|
|
Thanks to Christian von Roques, Peter Lawler,
and Jim Meyering for the fixes.
|
|
|
|
|
|
|
|
|
|
|
|
It now includes bug reporting instructions/tips.
|
|
Thanks to Jim Meyering.
(From now on, I try to always remember to put
the relevant thanks to commit messages.)
|
|
Added lzma_nothrow for every function. It adds
throw() when the header is used in C++ code.
Some lzma_attrs were added or removed.
Lots of comments were improved.
|
|
|
|
Some questions worth answering were removed, because I
currently don't have good up to date answers to them.
|
|
|
|
|
|
Thanks to Jonathan Stott for the bug report.
|
|
made in --enable-dynamic.
|
|
|
|
Some programs will by default be linked against static
liblzma and some against shared liblzma. --enable-dynamic
now allows overriding the default to both directions
(all dynamic or all static) even when building both
shared and static liblzma.
This is quite messy compared to how simple thing it is supposed
to be. The complexity is mostly due to Windows support.
|
|
install-exec-hook -> install-data-hook
|
|
lzmainfo now links against static liblzma. In contrast
to other command line tools in XZ Utils, linking lzmainfo
against static liblzma by default is dumb. This will be
fixed once I have fixed some related issues in configure.ac.
|
|
Make xz error message translation usable outside
xz (at least in upcoming lzmainfo).
|
|
|