Lasse Collin [Tue, 17 Feb 2009 08:43:00 +0000 (10:43 +0200)]
Added lzma_easy_buffer_encode(). Splitted easy.c into small
pieces to avoid unneeded dependencies making statically
linked applications bigger than needed.
Lasse Collin [Fri, 13 Feb 2009 22:45:29 +0000 (00:45 +0200)]
Cleanups to the code that detects the amount of RAM and
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.
Lasse Collin [Fri, 13 Feb 2009 16:00:03 +0000 (18:00 +0200)]
Changed how the version number is specified in various places.
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.
Lasse Collin [Tue, 10 Feb 2009 19:48:35 +0000 (21:48 +0200)]
Removed Makefile from .gitignore since not all Makefiles
in the repository are generated by Autotools. People
should do test builds in a separate build directory anyway.
Lasse Collin [Sun, 8 Feb 2009 16:24:50 +0000 (18:24 +0200)]
Add a separate internal function to initialize the CRC32
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.
Lasse Collin [Sat, 7 Feb 2009 19:17:07 +0000 (21:17 +0200)]
Make it easy to choose if command line tools should be
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.
Lasse Collin [Sat, 7 Feb 2009 14:26:58 +0000 (16:26 +0200)]
MinGW support: Don't build fastpos_tablegen.c as part of
liblzma. Build both static and dynamic liblzma, and also
static and dynamic versions of the command line tools.
Lasse Collin [Sat, 7 Feb 2009 09:11:50 +0000 (11:11 +0200)]
Introduced LZMA_API_STATIC macro, which the applications
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.
Lasse Collin [Fri, 6 Feb 2009 07:13:15 +0000 (09:13 +0200)]
Recreated the BCJ test files for x86 and SPARC. The old files
were linked with crt*.o, which are copyrighted, and thus the
old test files were not in the public domain as a whole. They
are freely distributable though, but it is better to be careful
and avoid including any copyrighted pieces in the test files.
The new files are just compiled and assembled object files,
and thus don't contain any copyrighted code.
Lasse Collin [Mon, 2 Feb 2009 19:19:01 +0000 (21:19 +0200)]
Updated the x86 assembler code:
- 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.
Lasse Collin [Mon, 2 Feb 2009 18:14:03 +0000 (20:14 +0200)]
Modify LZMA_API macro so that it works on Windows with
other compilers than MinGW. This may hurt readability
of the API headers slightly, but I don't know any
better way to do this.
Lasse Collin [Sat, 31 Jan 2009 09:01:48 +0000 (11:01 +0200)]
Add LZMA_API to liblzma API headers. It's useful at least
on Windows. sysdefs.h no longer #includes lzma.h, so lzma.h
has to be #included separately where needed.
Lasse Collin [Wed, 28 Jan 2009 15:16:38 +0000 (17:16 +0200)]
The .xz file format specification version 1.0.0 is now
officially released. The format has been technically the same
since 2008-11-19, but now that it is frozen, people can start
using it without a fear that the format will break.
Lasse Collin [Wed, 28 Jan 2009 06:43:26 +0000 (08:43 +0200)]
Fix uninitialized variables in alone_decoder.c. This bug was
triggered by the previous commit, since these variables were
not used by anything before support for a preset dictionary.
Lasse Collin [Sat, 17 Jan 2009 12:24:25 +0000 (14:24 +0200)]
Beta was supposed to be API stable but I had forgot to rename
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.
Lasse Collin [Thu, 15 Jan 2009 12:27:32 +0000 (14:27 +0200)]
Fixed a bug in 7z2lzma.bash to make it work with .7z files
that use something else than 2^n as the dictionary size.
Thanks to Dan Shechter for the bug report.
Lasse Collin [Wed, 31 Dec 2008 14:29:39 +0000 (16:29 +0200)]
Renamed lzma_options_simple to lzma_options_bcj in the API.
The internal implementation is still using the name "simple".
It may need some cleanups, so I look at it later.
Lasse Collin [Tue, 30 Dec 2008 22:30:49 +0000 (00:30 +0200)]
Remove lzma_init() and other init functions from liblzma API.
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.
Lasse Collin [Sat, 27 Dec 2008 17:32:20 +0000 (19:32 +0200)]
Revert a change made in 3b34851de1eaf358cf9268922fa0eeed8278d680
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.
Lasse Collin [Wed, 17 Dec 2008 19:49:53 +0000 (21:49 +0200)]
Remove the alignment functions for now. Maybe they will
be added back in some form later, but the current version
wasn't modular, so it would need fixing anyway.
Lasse Collin [Fri, 12 Dec 2008 20:43:21 +0000 (22:43 +0200)]
Some adjustments to GCC warning flags. The important change
is the removal of -pedantic. It messes up -Werror (which I
really want to keep so that I don't miss any warnings) with
printf format strings that are in POSIX but not in C99.