Age | Commit message (Collapse) | Author | Files | Lines |
|
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.
|
|
|
|
|
|
|
|
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.
|
|
|
|
Thanks to Jonathan Stott for the bug report.
|
|
|
|
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).
|
|
|
|
|
|
Attempts to compare two compressed files result in no output and
exit status 2.
Instead of going to standard output, ‘diff’ output is being
captured in the xz_status variable along with the exit status from
the decompression commands. Later, when this variable is examined
for nonzero status codes, numerals from dates in the ‘diff’ output
make it appear as though decompression failed.
So let the ‘diff’ output leak to standard output with another file
descriptor. (This trick is used in all similar contexts elsewhere
in xzdiff and in the analogous context in gzip’s zdiff script.)
|
|
It can be somewhat confusing that
less < some_file.txt
works fine, whereas
xzless < some_file.txt.xz
does not. Since version 429, ‘less’ allows a filter specified in
the LESSOPEN environment variable to preprocess its input even if
it comes from standard input, if $LESSOPEN begins with ‘|-’. So
set $LESSOPEN to take advantage of this feature.
Check less’s version at runtime so xzless can continue to work
with older versions.
|
|
|
|
invalid memory access if XZ_OPT was defined.
|
|
|
|
|
|
|
|
This may slightly ease writing scripts that construct
filter-specific option strings dynamically.
|
|
when no custom chain is in use.
|
|
This is a quick and slightly dirty fix to make the code
conform to the latest file format specification. Without
this patch, it's possible to make corrupt files by
specifying start offset that is not a multiple of the
filter's alignment. Custom start offset is almost never
used, so this was only a minor bug.
The xz command line tool doesn't validate the start offset,
so one will get a bit unclear error message if trying to use
an invalid start offset.
|
|
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.
|
|
It was ignored for compatibility with xz, but now that
--decompress --stdout --force copies unrecognized files
as is to stdout, simply ignoring --force in xzdec would
be wrong. xzdec will not support copying unrecognized
data as is to stdout, so it cannot support --force.
|
|
use AC_PROG_SED. We don't do anything fancy with sed,
so this should work OK. libtool 2.2 sets SED but 1.5
doesn't, so $(SED) happened to work when using libtool 2.2.
|
|
the latest versions found from gzip CVS repository.
configure will try to find a POSIX shell to be used by
the scripts. This should ease portability on systems
which have pre-POSIX /bin/sh.
xzgrep and xzdiff support .xz, .lzma, .gz, and .bz2 files.
xzmore and xzless support only .xz and .lzma files.
The name of the xz executable used in these scripts is
now correct even if --program-transform-name has been used.
|
|
|
|
files as is to standard output.
This feature is needed to be more compatible with gzip's
behavior. This was more complicated to implement than it
sounds, because the way liblzma is able to return errors with
files of only a few bytes in size. xz now has its own file
type detection code and no longer uses lzma_auto_decoder().
|
|
xz and xzdec.
Use also PACKAGE_NAME instead of hardcoding "XZ Utils".
|
|
Don't use libtool convenience libraries to avoid recently
discovered long-standing subtle but somewhat severe bugs
in libtool (at least 1.5.22 and 2.2.6 are affected). It
was found when porting XZ Utils to Windows
<http://lists.gnu.org/archive/html/libtool/2009-06/msg00070.html>
but the problem is significant also e.g. on GNU/Linux.
Unless --disable-shared is passed to configure, static
library built from a set of convenience libraries will
contain PIC objects. That is, while libtool builds non-PIC
objects too, only PIC objects will be used from the
convenience libraries. On 32-bit x86 (tested on mobile XP2400+),
using PIC instead of non-PIC makes the decompressor 10 % slower
with the default CFLAGS.
So while xz was linked against static liblzma by default,
it got the slower PIC objects unless --disable-shared was
used. I tend develop and benchmark with --disable-shared
due to faster build time, so I hadn't noticed the problem
in benchmarks earlier.
This commit also adds support for building Windows resources
into liblzma and executables.
|
|
|
|
|
|
to prepare for building them with Autotools.
|
|
|
|
--program-{prefix,suffix,transform} is passed to configure.
|
|
|
|
Autotools based builds on Windows.
|
|
|
|
to avoid problems on systems with system headers with those
names.
|
|
|
|
format character with snprintf() on POSIX systems but not
on non-POSIX systems and still keep xgettext working.
|
|
the Autotools based build system. It's not good yet, more
fixes will follow.
|
|
Fix the ordering of libgnu.a and LTLIBINTL on the linker
command line and added missing LTLIBINTL to tests/Makefile.am.
|
|
|
|
|
|
|
|
minor cleanups.
|
|
Released .xz spec 1.0.2 due to this fix too.
|
|
via lzma_block structure.
This changes ABI but not doesn't break API.
|
|
and --itanium.
|
|
in the xz command line tool.
|
|
Cleaned up the --help message a little.
|
|
Update the memory usage info text in --help to match
the text in xz --long-help.
|
|
|
|
|
|
|
|
--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.
|
|
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.
|
|
Don't round the memory usage limit in xzdec --help to avoid
an integer overflow and to not give wrong impression that
the limit is high enough when it may not actually be.
|
|
This adds lzdiff, lzgrep, and lzmore to the list of symlinks to install.
It also installs symlinks for the manual pages and removes the new
symlinks on uninstall.
|
|
-Wno-uninitialized to silence a bogus warning.
|
|
liblzma tries to avoid useless free()/malloc() pairs in
initialization when multiple files are handled using the
same lzma_stream. This didn't work with filter chains
due to comparison of wrong pointers in lzma_next_coder_init(),
making liblzma think that no memory reallocation is needed
even when it actually is.
Easy way to trigger this bug is to decompress two files with
a single xz command. The first file should have e.g. x86+LZMA2
as the filter chain, and the second file just LZMA2.
|
|
On 64-bit system it would have gone into infinite
loop if a single input buffer was over 4 GiB (unlikely).
|
|
|
|
Some minor documentation cleanups were made at the same time.
|
|
Fortunately, this bug had no security risk other than accepting
some corrupt files as valid.
|
|
Thanks to Bert Wesarg.
|
|
|
|
- Don't use Windows-specific code on Windows. The old code
required at least Windows 2000. Now it should work on
Windows 98 and later, and maybe on Windows 95 too.
- Use less precision when showing estimated remaining time.
- Fix some small design issues.
|
|
|
|
pieces to avoid unneeded dependencies making statically
linked applications bigger than needed.
|
|
Thanks to Hongbo Ni for the original patch.
|
|
|
|
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.
|
|
Now configure.ac will get the version number directly from
src/liblzma/api/lzma/version.h. The intent is to reduce the
number of places where the version number is duplicated. In
future, support for displaying Git commit ID may be added too.
|
|
|
|
Here DOS-like means DOS, Windows, and OS/2.
|
|
line. Previously custom CFLAGS worked only when they were
passed to configure.
|
|
|
|
table, which is used also by LZ encoder. This was needed
because calling lzma_crc32() and ignoring the result is
a no-op due to lzma_attr_pure.
|
|
message suggests.
|
|
separator on Windows when parsing argv[0].
|
|
linked statically or dynamically against liblzma. The
default is still to use static liblzma, but it can now
be changed by passing --enable-dynamic to configure.
Thanks to Mike Frysinger for the original patch.
Fixed a few minor bugs in configure.ac.
|
|
the comment in hardware.c already said.
|
|
avoid __declspec(dllexport) equivalent.
|
|
need to #define when linking against static liblzma on
platforms like Windows. Most developers don't need to
care about LZMA_API_STATIC at all.
|
|
It now builds with MinGW.
|
|
|
|
This doesn't affect most systems, since most systems
have better functions available.
|
|
- Use call/ret pair to get instruction pointer for PIC.
- Use PIC only if PIC or __PIC__ is #defined.
- The code should work on MinGW and Darwin in addition
to GNU/Linux and Solaris.
|
|
other compilers than MinGW. This may hurt readability
of the API headers slightly, but I don't know any
better way to do this.
|
|
function should be rewritten anyway.
|
|
functions, and cleaned up filter.h API header a little.
May be very buggy, not tested yet.
|
|
|
|
on Windows.
|
|
on Windows. sysdefs.h no longer #includes lzma.h, so lzma.h
has to be #included separately where needed.
|
|
|
|
beginning of the line.
|
|
stdint.h or inttypes.h.
|
|
|
|
|
|
triggered by the previous commit, since these variables were
not used by anything before support for a preset dictionary.
|
|
and LZMA2. It is not supported by the .xz format or the xz
command line tool yet.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LZMA_DATA_ERROR with valid data. The bug was added in
e114502b2bc371e4a45449832cb69be036360722.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
can be used outside lzma2_encoder.c.
|
|
|
|
lzma_memlimit_encoder and lzma_memlimit_decoder to
lzma_raw_encoder_memlimit and lzma_raw_decoder_memlimit. :-(
Now it is fixed. Hopefully it doesn't cause too much trouble
to those who already thought API is stable.
|
|
are enabled.
|
|
of 4.999.7beta.
|
|
|
|
|
|
The internal implementation is still using the name "simple".
It may need some cleanups, so I look at it later.
|
|
should have been in the previous commit.
|
|
Half of developers were already forgetting to use these
functions, which could have caused total breakage in some future
liblzma version or even now if --enable-small was used. Now
liblzma uses pthread_once() to do the initializations unless
it has been built with --disable-threads which make these
initializations thread-unsafe.
When --enable-small isn't used, liblzma currently gets needlessly
linked against libpthread (on systems that have it). While it is
stupid for now, liblzma will need threads in future anyway, so
this stupidity will be temporary only.
When --enable-small is used, different code CRC32 and CRC64 is
now used than without --enable-small. This made the resulting
binary slightly smaller, but the main reason was to clean it up
and to handle the lack of lzma_init_check().
The pkg-config file lzma.pc was renamed to liblzma.pc. I'm not
sure if it works correctly and portably for static linking
(Libs.private includes -pthread or other operating system
specific flags). Hopefully someone complains if it is bad.
lzma_rc_prices[] is now included as a precomputed array even
with --enable-small. It's just 128 bytes now that it uses uint8_t
instead of uint32_t. Smaller array seemed to be at least as fast
as the more bloated uint32_t array on x86; hopefully it's not bad
on other architectures.
|
|
that was related to LZMA_MODE_FAST. The original code is slightly
faster although it compresses slightly worse. But since it is fast
mode, it is better to select the faster version.
|
|
|
|
The API and ABI should now be very close to stable,
although the code behind it isn't yet.
|
|
|
|
be added back in some form later, but the current version
wasn't modular, so it would need fixing anyway.
|
|
|
|
the previous commit. (Probably the previous commit has
other bugs too, it wasn't tested.)
|
|
|
|
which made LZ decoder return too early after dictionary
reset. This fixes it.
|
|
|
|
|
|
|
|
to take a preset as a template and modify it a little.
|
|
to validate the filter options. Add missing validation
to LZMA2 encoder when options are changed in the middle
of encoding.
|
|
ability to also validate the filter chain and options (not
implemented yet for all filters).
|
|
memory usage.
|
|
to validate the filter options.
|
|
part of 656ec87882ee74b192c4ea4a233a235eca7b04d4.
|
|
also in the first LZMA chunk after a dictionary reset in
uncompressed chunk.
|
|
the options.
|
|
progress indicator but since COLUMNS isn't usually available,
the code was left commented out.
|
|
|
|
|
|
LZMA_PROG_ERROR in single-call mode if there's no output
space.
|
|
|
|
|
|
files and lzmadec only .lzma files.
|
|
|
|
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.
|
|
- Updated to the latest, probably final file format version.
- Command line tool reworked to not use threads anymore.
Threading will probably go into liblzma anyway.
- Memory usage limit is now about 30 % for uncompression
and about 90 % for compression.
- Progress indicator with --verbose
- Simplified --help and full --long-help
- Upgraded to the last LGPLv2.1+ getopt_long from gnulib.
- Some bug fixes
|
|
|
|
|
|
|
|
This also fixes a bug related to --suffix option. Some issues
with suffixes with --format=raw were not fixed.
|
|
|
|
|
|
|
|
suffix wasn't changed yet.
|
|
|
|
|
|
|
|
- LZMA_VLI_VALUE_MAX -> LZMA_VLI_MAX
- LZMA_VLI_VALUE_UNKNOWN -> LZMA_VLI_UNKNOWN
- LZMA_HEADER_ERRRO -> LZMA_OPTIONS_ERROR
|
|
|
|
been removed in 2ba01bfa755e47ff6af84a978e3c8d63d7d2775e.
|
|
|
|
support unaligned memory access.
|
|
|
|
|
|
Use LZMA_PROG_ERROR instead of LZMA_HEADER_ERROR if the Filter ID
is in the reserved range. This allows Block Header encoder to
detect unallowed Filter IDs, which is good for Stream encoder.
|
|
|
|
|
|
code from block_private.h to block_decoder.c. Now the Block
encoder doesn't need compressed_size and uncompressed_size
from lzma_block structure to be initialized.
|
|
|
|
|
|
|
|
line tool, and made various cleanups. --lzma was renamed to
--lzma1 to prevent people from accidentally using LZMA when
they want LZMA2.
|
|
simply nothing that would use it. Allow LZMA_FINISH to the
decoders, which will usually ignore it (auto decoder and
Stream decoder being exceptions).
|
|
|
|
|
|
LZMA_Alone files. Decoding of concatenated LZMA_Alone files is
intentionally not supported, so it is better to put this in
auto decoder than LZMA_Alone decoder.
|
|
|
|
|
|
|
|
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.
|
|
|
|
literal coder as part of the main LZMA encoder or
decoder structure.
Make the LZMA decoder to rely on the current internal API
to free the allocated memory in case an error occurs.
|
|
|
|
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.
|
|
introduced in 369f72fd656f537a9a8e06f13e6d0d4c242be22f.
|
|
lzmadec to make them accept also KiB in addition Ki etc.
Fix also memory usage information in lzmadec --help.
|