]> granicus.if.org Git - xz/log
xz
11 years agoBump the version number to 5.1.2alpha. v5.1.2alpha
Lasse Collin [Wed, 4 Jul 2012 17:01:49 +0000 (20:01 +0300)]
Bump the version number to 5.1.2alpha.

11 years agoUpdate NEWS for 5.1.2alpha.
Lasse Collin [Wed, 4 Jul 2012 17:01:19 +0000 (20:01 +0300)]
Update NEWS for 5.1.2alpha.

11 years agoxz: Fix the version number printed by xz -lvv.
Lasse Collin [Wed, 4 Jul 2012 16:58:23 +0000 (19:58 +0300)]
xz: Fix the version number printed by xz -lvv.

The decoder bug was fixed in 5.0.2 instead of 5.0.3.

11 years agoBuild: Add a comment to configure.ac about symbol versioning.
Lasse Collin [Wed, 4 Jul 2012 14:11:31 +0000 (17:11 +0300)]
Build: Add a comment to configure.ac about symbol versioning.

11 years agoUpdate TODO.
Lasse Collin [Wed, 4 Jul 2012 14:06:49 +0000 (17:06 +0300)]
Update TODO.

11 years agoDocument --enable-symbol-versions in INSTALL.
Lasse Collin [Wed, 4 Jul 2012 14:05:46 +0000 (17:05 +0300)]
Document --enable-symbol-versions in INSTALL.

11 years agoxz: Add incomplete support for --block-list.
Lasse Collin [Tue, 3 Jul 2012 18:16:39 +0000 (21:16 +0300)]
xz: Add incomplete support for --block-list.

It's broken with threads and when also --block-size is used.

11 years agoxz: Update the man page about the new field in --robot -lvv.
Lasse Collin [Sun, 1 Jul 2012 15:44:33 +0000 (18:44 +0300)]
xz: Update the man page about the new field in --robot -lvv.

11 years agoliblzma: Check that the first byte of range encoded data is 0x00.
Lasse Collin [Thu, 28 Jun 2012 07:47:49 +0000 (10:47 +0300)]
liblzma: Check that the first byte of range encoded data is 0x00.

It is just to be more pedantic and thus perhaps catch broken
files slightly earlier.

11 years agoUpdate NEWS from 5.0.4.
Lasse Collin [Fri, 22 Jun 2012 16:00:23 +0000 (19:00 +0300)]
Update NEWS from 5.0.4.

11 years agoxz: Update man page date to match the latest update.
Lasse Collin [Fri, 22 Jun 2012 11:34:03 +0000 (14:34 +0300)]
xz: Update man page date to match the latest update.

11 years agoDocs: Language fix to 01_compress_easy.c.
Lasse Collin [Mon, 18 Jun 2012 18:27:47 +0000 (21:27 +0300)]
Docs: Language fix to 01_compress_easy.c.

Thanks to Jonathan Nieder.

11 years agoFix the top-level Makefile.am for the new example programs.
Lasse Collin [Thu, 14 Jun 2012 17:15:30 +0000 (20:15 +0300)]
Fix the top-level Makefile.am for the new example programs.

11 years agoDocs: Add new example programs.
Lasse Collin [Thu, 14 Jun 2012 07:52:33 +0000 (10:52 +0300)]
Docs: Add new example programs.

These have more comments than the old examples and
human-readable error messages. More tutorial-like examples
are needed but these are a start.

11 years agoDocs: Move xz_pipe_comp.c and xz_pipe_decomp.c to doc/examples_old.
Lasse Collin [Thu, 14 Jun 2012 07:33:27 +0000 (10:33 +0300)]
Docs: Move xz_pipe_comp.c and xz_pipe_decomp.c to doc/examples_old.

It is good to keep these around to so that if someone has
copied the decompressor bug from xz_pipe_decomp.c he has
an example how to easily fix it.

11 years agoDocs: Fix a bug in xz_pipe_decomp.c example program.
Lasse Collin [Thu, 14 Jun 2012 07:33:01 +0000 (10:33 +0300)]
Docs: Fix a bug in xz_pipe_decomp.c example program.

12 years agoTranslations: Update the French translation.
Lasse Collin [Wed, 30 May 2012 20:14:33 +0000 (23:14 +0300)]
Translations: Update the French translation.

Thanks to Adrien Nader.

12 years agoTranslations: Update the German translation.
Lasse Collin [Tue, 29 May 2012 20:42:37 +0000 (23:42 +0300)]
Translations: Update the German translation.

The previous only included the new strings in v5.0.

12 years agoTranslations: Update the German translation.
Lasse Collin [Tue, 29 May 2012 19:26:27 +0000 (22:26 +0300)]
Translations: Update the German translation.

12 years agoTranslations: Update Polish translation.
Lasse Collin [Tue, 29 May 2012 19:14:21 +0000 (22:14 +0300)]
Translations: Update Polish translation.

12 years agoliblzma: Fix possibility of incorrect LZMA_BUF_ERROR.
Lasse Collin [Mon, 28 May 2012 17:42:11 +0000 (20:42 +0300)]
liblzma: Fix possibility of incorrect LZMA_BUF_ERROR.

lzma_code() could incorrectly return LZMA_BUF_ERROR if
all of the following was true:

  - The caller knows how many bytes of output to expect
    and only provides that much output space.

  - When the last output bytes are decoded, the
    caller-provided input buffer ends right before
    the LZMA2 end of payload marker. So LZMA2 won't
    provide more output anymore, but it won't know it
    yet and thus won't return LZMA_STREAM_END yet.

  - A BCJ filter is in use and it hasn't left any
    unfiltered bytes in the temp buffer. This can happen
    with any BCJ filter, but in practice it's more likely
    with filters other than the x86 BCJ.

Another situation where the bug can be triggered happens
if the uncompressed size is zero bytes and no output space
is provided. In this case the decompression can fail even
if the whole input file is given to lzma_code().

A similar bug was fixed in XZ Embedded on 2011-09-19.

12 years agoUpdate THANKS.
Lasse Collin [Mon, 28 May 2012 12:38:32 +0000 (15:38 +0300)]
Update THANKS.

12 years agoxz: Don't show a huge number in -vv when memory limit is disabled.
Lasse Collin [Mon, 28 May 2012 12:37:43 +0000 (15:37 +0300)]
xz: Don't show a huge number in -vv when memory limit is disabled.

12 years agoxz: Document the "summary" lines of --robot -lvv.
Lasse Collin [Sun, 27 May 2012 19:30:17 +0000 (22:30 +0300)]
xz: Document the "summary" lines of --robot -lvv.

This documents only the columns that are in v5.0.
The new columns added in the master branch aren't
necessarily stable yet.

12 years agoxz: Fix output of verbose --robot --list modes.
Lasse Collin [Sun, 27 May 2012 18:53:20 +0000 (21:53 +0300)]
xz: Fix output of verbose --robot --list modes.

It printed the filename in "filename (x/y)" format
which it obviously shouldn't do in robot mode.

12 years agoBuild: Upgrade m4/acx_pthread.m4 to the latest version.
Lasse Collin [Thu, 24 May 2012 15:33:54 +0000 (18:33 +0300)]
Build: Upgrade m4/acx_pthread.m4 to the latest version.

12 years agoUpdate THANKS.
Lasse Collin [Thu, 10 May 2012 18:15:17 +0000 (21:15 +0300)]
Update THANKS.

12 years agoDocs: Cleanup line wrapping a bit.
Lasse Collin [Thu, 10 May 2012 18:14:16 +0000 (21:14 +0300)]
Docs: Cleanup line wrapping a bit.

12 years agoFix a few typos and add some missing articles in some documents.
Benno Schulenberg [Tue, 13 Mar 2012 21:04:04 +0000 (22:04 +0100)]
Fix a few typos and add some missing articles in some documents.

Also hyphenate several compound adjectives.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agoWindows: Update notes about static linking with MSVC.
Lasse Collin [Sun, 29 Apr 2012 08:51:25 +0000 (11:51 +0300)]
Windows: Update notes about static linking with MSVC.

12 years agoliblzma: Remove outdated comments.
Lasse Collin [Thu, 19 Apr 2012 12:25:26 +0000 (15:25 +0300)]
liblzma: Remove outdated comments.

12 years agoDOS: Link against DJGPP's libemu to support FPU emulation.
Lasse Collin [Thu, 19 Apr 2012 11:17:52 +0000 (14:17 +0300)]
DOS: Link against DJGPP's libemu to support FPU emulation.

This way xz should work on 386SX and 486SX. Floating point
only is needed for verbose output in xz.

12 years agoliblzma: Fix Libs.private in liblzma.pc to include -lrt when needed.
Lasse Collin [Thu, 19 Apr 2012 11:02:25 +0000 (14:02 +0300)]
liblzma: Fix Libs.private in liblzma.pc to include -lrt when needed.

12 years agoDocs: Update MINIX 3 information in INSTALL.
Lasse Collin [Thu, 19 Apr 2012 10:58:55 +0000 (13:58 +0300)]
Docs: Update MINIX 3 information in INSTALL.

12 years agoUpdate THANKS.
Lasse Collin [Wed, 22 Feb 2012 12:23:13 +0000 (14:23 +0200)]
Update THANKS.

12 years agoFix exit status of xzgrep when grepping binary files.
Lasse Collin [Wed, 22 Feb 2012 12:02:34 +0000 (14:02 +0200)]
Fix exit status of xzgrep when grepping binary files.

When grepping binary files, grep may exit before it has
read all the input. In this case, gzip -q returns 2 (eating
SIGPIPE), but xz and bzip2 show SIGPIPE as the exit status
(e.g. 141). This causes wrong exit status when grepping
xz- or bzip2-compressed binary files.

The fix checks for the special exit status that indicates SIGPIPE.
It uses kill -l which should be supported everywhere since it
is in both SUSv2 (1997) and POSIX.1-2008.

Thanks to James Buren for the bug report.

12 years agoUpdate THANKS.
Lasse Collin [Wed, 22 Feb 2012 10:08:43 +0000 (12:08 +0200)]
Update THANKS.

12 years agoFix compiling with IBM XL C on AIX.
Lasse Collin [Wed, 22 Feb 2012 10:00:16 +0000 (12:00 +0200)]
Fix compiling with IBM XL C on AIX.

12 years agoTests: Fix a compiler warning with _FORTIFY_SOURCE.
Lasse Collin [Tue, 10 Jan 2012 15:13:03 +0000 (17:13 +0200)]
Tests: Fix a compiler warning with _FORTIFY_SOURCE.

Reported here:
http://sourceforge.net/projects/lzmautils/forums/forum/708858/topic/4927385

12 years agoDocs: Explain the stable releases better in README.
Lasse Collin [Mon, 19 Dec 2011 19:21:29 +0000 (21:21 +0200)]
Docs: Explain the stable releases better in README.

12 years agoxz: Show minimum required XZ Utils version in xz -lvv.
Lasse Collin [Mon, 7 Nov 2011 11:07:52 +0000 (13:07 +0200)]
xz: Show minimum required XZ Utils version in xz -lvv.

Man page wasn't updated yet.

12 years agoxz: Fix a typo in a comment.
Lasse Collin [Fri, 4 Nov 2011 15:57:16 +0000 (17:57 +0200)]
xz: Fix a typo in a comment.

Thanks to Bela Lubkin.

12 years agoUpdate THANKS.
Lasse Collin [Thu, 3 Nov 2011 15:08:02 +0000 (17:08 +0200)]
Update THANKS.

12 years agoxz: Fix xz on EBCDIC systems.
Lasse Collin [Thu, 3 Nov 2011 15:07:22 +0000 (17:07 +0200)]
xz: Fix xz on EBCDIC systems.

Thanks to Chris Donawa.

12 years agoUpdate THANKS.
Lasse Collin [Sun, 23 Oct 2011 14:09:10 +0000 (17:09 +0300)]
Update THANKS.

12 years agoliblzma: Fix invalid free() in the threaded encoder.
Lasse Collin [Sun, 23 Oct 2011 14:08:14 +0000 (17:08 +0300)]
liblzma: Fix invalid free() in the threaded encoder.

It was triggered if initialization failed e.g. due to
running out of memory.

Thanks to Arkadiusz Miskiewicz.

12 years agoliblzma: Fix a deadlock in the threaded encoder.
Lasse Collin [Sun, 23 Oct 2011 14:05:55 +0000 (17:05 +0300)]
liblzma: Fix a deadlock in the threaded encoder.

It was triggered when reinitializing the encoder,
e.g. when encoding two files.

12 years agoBuild: Fix "make check" on Windows.
Lasse Collin [Tue, 6 Sep 2011 09:03:41 +0000 (12:03 +0300)]
Build: Fix "make check" on Windows.

12 years agoUpdate THANKS.
Lasse Collin [Tue, 9 Aug 2011 18:19:13 +0000 (21:19 +0300)]
Update THANKS.

12 years agoWorkaround unusual SIZE_MAX on SCO OpenServer.
Lasse Collin [Tue, 9 Aug 2011 18:16:44 +0000 (21:16 +0300)]
Workaround unusual SIZE_MAX on SCO OpenServer.

12 years agoRun the scripts with the correct shell in test_scripts.sh.
Lasse Collin [Sat, 6 Aug 2011 17:37:28 +0000 (20:37 +0300)]
Run the scripts with the correct shell in test_scripts.sh.

The scripts are now made executable in the build tree.
This way the scripts can be run like programs in
test_scripts.sh. Previously test_scripts.sh always
used sh but it's not correct if @POSIX_SHELL@ is set
to something else by configure.

Thanks to Jonathan Nieder for the patch.

12 years agoFix exit status of "xzdiff foo.xz bar.xz".
Lasse Collin [Sun, 31 Jul 2011 08:01:47 +0000 (11:01 +0300)]
Fix exit status of "xzdiff foo.xz bar.xz".

xzdiff was clobbering the exit status from diff in a case
statement used to analyze the exit statuses from "xz" when
its operands were two compressed files. Save and restore
diff's exit status to fix this.

The bug is inherited from zdiff in GNU gzip and was fixed
there on 2009-10-09.

Thanks to Jonathan Nieder for the patch and
to Peter Pallinger for reporting the bug.

12 years agoliblzma: Remove unneeded semicolon.
Lasse Collin [Thu, 16 Jun 2011 09:15:29 +0000 (12:15 +0300)]
liblzma: Remove unneeded semicolon.

13 years agoBuild: Make configure print if symbol versioning is enabled or not.
Lasse Collin [Sat, 28 May 2011 16:24:56 +0000 (19:24 +0300)]
Build: Make configure print if symbol versioning is enabled or not.

13 years agoDon't call close(-1) in tuklib_open_stdxxx() on error.
Lasse Collin [Sat, 28 May 2011 13:43:26 +0000 (16:43 +0300)]
Don't call close(-1) in tuklib_open_stdxxx() on error.

Thanks to Jim Meyering.

13 years agoliblzma: Use symbol versioning.
Lasse Collin [Sat, 28 May 2011 12:55:39 +0000 (15:55 +0300)]
liblzma: Use symbol versioning.

Symbol versioning is enabled by default on GNU/Linux,
other GNU-based systems, and FreeBSD.

I'm not sure how stable this is, so it may need
backward-incompatible changes before the next release.

The idea is that alpha and beta symbols are considered
unstable and require recompiling the applications that
use those symbols. Once a symbol is stable, it may get
extended with new features in ways that don't break
compatibility with older ABI & API.

The mydist target runs validate_map.sh which should
catch some probable problems in liblzma.map. Otherwise
I would forget to update the map file for new releases.

13 years agoTranslations: Update the Italian translation.
Lasse Collin [Sat, 28 May 2011 06:46:46 +0000 (09:46 +0300)]
Translations: Update the Italian translation.

Thanks to Milo Casagrande.

13 years agoTests: Add a test file for the bug in the previous commit.
Lasse Collin [Sat, 28 May 2011 05:46:04 +0000 (08:46 +0300)]
Tests: Add a test file for the bug in the previous commit.

13 years agoxz: Fix error handling in xz -lvv.
Lasse Collin [Fri, 27 May 2011 19:25:44 +0000 (22:25 +0300)]
xz: Fix error handling in xz -lvv.

It could do an invalid free() and read past the end
of the uninitialized filters array.

13 years agoliblzma: Handle allocation failures correctly in lzma_index_init().
Lasse Collin [Fri, 27 May 2011 19:09:49 +0000 (22:09 +0300)]
liblzma: Handle allocation failures correctly in lzma_index_init().

Thanks to Jim Meyering.

13 years agoBuild: Fix checking for system-provided SHA-256.
Lasse Collin [Mon, 23 May 2011 21:23:46 +0000 (00:23 +0300)]
Build: Fix checking for system-provided SHA-256.

13 years agoBuild: Set GZIP_ENV=-9n in top-level Makefile.am.
Lasse Collin [Mon, 23 May 2011 15:30:30 +0000 (18:30 +0300)]
Build: Set GZIP_ENV=-9n in top-level Makefile.am.

13 years agoUpdate NEWS for 5.0.3.
Lasse Collin [Sun, 22 May 2011 13:42:11 +0000 (16:42 +0300)]
Update NEWS for 5.0.3.

13 years agoAdd French translation.
Lasse Collin [Sat, 21 May 2011 13:28:44 +0000 (16:28 +0300)]
Add French translation.

It is known that the BCJ filter --help text is only
partially translated.

13 years agoxz: Translate also the string used to print the program name.
Lasse Collin [Sat, 21 May 2011 12:12:10 +0000 (15:12 +0300)]
xz: Translate also the string used to print the program name.

French needs a space before a colon, e.g. "xz : foo error".

13 years agoliblzma: Try to use SHA-256 from the operating system.
Lasse Collin [Sat, 21 May 2011 12:08:44 +0000 (15:08 +0300)]
liblzma: Try to use SHA-256 from the operating system.

If the operating system libc or other base libraries
provide SHA-256, use that instead of our own copy.
Note that this doesn't use OpenSSL or libgcrypt or
such libraries to avoid creating dependencies to
other packages.

This supports at least FreeBSD, NetBSD, OpenBSD, Solaris,
MINIX, and Darwin. They all provide similar but not
identical SHA-256 APIs; everyone is a little different.

Thanks to Wim Lewis for the original patch, improvements,
and testing.

13 years agoDon't use clockid_t in mythread.h when clock_gettime() isn't available.
Lasse Collin [Tue, 17 May 2011 09:52:18 +0000 (12:52 +0300)]
Don't use clockid_t in mythread.h when clock_gettime() isn't available.

Thanks to Wim Lewis for the patch.

13 years agoUpdate THANKS.
Lasse Collin [Tue, 17 May 2011 09:26:28 +0000 (12:26 +0300)]
Update THANKS.

13 years agoUpdate INSTALL with a note about linker problem on OpenSolaris x86.
Lasse Collin [Tue, 17 May 2011 09:21:33 +0000 (12:21 +0300)]
Update INSTALL with a note about linker problem on OpenSolaris x86.

13 years agoBuild: Fix initialization of enable_check_* variables in configure.ac.
Lasse Collin [Tue, 17 May 2011 09:01:37 +0000 (12:01 +0300)]
Build: Fix initialization of enable_check_* variables in configure.ac.

This doesn't matter much in practice since it is unlikely
that anyone would have such environment variable names.

Thanks to Wim Lewis.

13 years agoAdd underscores to attributes (__attribute((__foo__))).
Lasse Collin [Tue, 17 May 2011 08:54:38 +0000 (11:54 +0300)]
Add underscores to attributes (__attribute((__foo__))).

13 years agoxz: Fix input file position when --single-stream is used.
Lasse Collin [Sun, 1 May 2011 09:24:23 +0000 (12:24 +0300)]
xz: Fix input file position when --single-stream is used.

Now the following works as you would expect:

    echo foo | xz > foo.xz
    echo bar | xz >> foo.xz
    ( xz -dc --single-stream ; xz -dc --single-stream ) < foo.xz

Note that it doesn't work if the input is not seekable
or if there is Stream Padding between the concatenated
.xz Streams.

13 years agoxz: Print the maximum number of worker threads in xz -vv.
Lasse Collin [Sun, 1 May 2011 09:15:51 +0000 (12:15 +0300)]
xz: Print the maximum number of worker threads in xz -vv.

13 years agoBuild: Warn if no supported method to detect the number of CPU cores.
Lasse Collin [Tue, 19 Apr 2011 07:44:48 +0000 (10:44 +0300)]
Build: Warn if no supported method to detect the number of CPU cores.

13 years agoUpdate THANKS.
Lasse Collin [Tue, 19 Apr 2011 06:55:06 +0000 (09:55 +0300)]
Update THANKS.

13 years agoFix portability problems in mythread.h.
Lasse Collin [Tue, 19 Apr 2011 06:20:44 +0000 (09:20 +0300)]
Fix portability problems in mythread.h.

Use gettimeofday() if clock_gettime() isn't available
(e.g. Darwin).

The test for availability of pthread_condattr_setclock()
and CLOCK_MONOTONIC was incorrect. Instead of fixing the
#ifdefs, use an Autoconf test. That way if there exists a
system that supports them but doesn't specify the matching
POSIX #defines, the features will still get detected.

Don't try to use pthread_sigmask() on OpenVMS. It doesn't
have that function.

Guard mythread.h against being #included multiple times.

13 years agoUpdate THANKS.
Lasse Collin [Mon, 18 Apr 2011 16:35:49 +0000 (19:35 +0300)]
Update THANKS.

13 years agoxzgrep: fix typo in $0 parsing
Martin Väth [Fri, 15 Apr 2011 08:54:49 +0000 (04:54 -0400)]
xzgrep: fix typo in $0 parsing

Reported-by: Diego Elio Pettenò <flameeyes@gentoo.org>
Signed-off-by: Martin Väth <vaeth@mathematik.uni-wuerzburg.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBump the version number to 5.1.1alpha and liblzma soname to 5.0.99. v5.1.1alpha
Lasse Collin [Tue, 12 Apr 2011 09:48:31 +0000 (12:48 +0300)]
Bump the version number to 5.1.1alpha and liblzma soname to 5.0.99.

13 years agoPut the unstable APIs behind #ifdef LZMA_UNSTABLE.
Lasse Collin [Tue, 12 Apr 2011 09:42:37 +0000 (12:42 +0300)]
Put the unstable APIs behind #ifdef LZMA_UNSTABLE.

This way people hopefully won't complain if these APIs
change and break code that used an older API.

13 years agoRemove doubled words from documentation and comments.
Lasse Collin [Tue, 12 Apr 2011 08:59:49 +0000 (11:59 +0300)]
Remove doubled words from documentation and comments.

Spot candidates by running these commands:
  git ls-files |xargs perl -0777 -n \
    -e 'while (/\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\s+\1\b/gims)' \
    -e '{$n=($` =~ tr/\n/\n/ + 1); ($v=$&)=~s/\n/\\n/g; print "$ARGV:$n:$v\n"}'

Thanks to Jim Meyering for the original patch.

13 years agoUpdate NEWS.
Lasse Collin [Tue, 12 Apr 2011 08:46:01 +0000 (11:46 +0300)]
Update NEWS.

13 years agoUpdate TODO.
Lasse Collin [Tue, 12 Apr 2011 08:45:40 +0000 (11:45 +0300)]
Update TODO.

13 years agoxz: Update the man page about threading.
Lasse Collin [Tue, 12 Apr 2011 08:08:55 +0000 (11:08 +0300)]
xz: Update the man page about threading.

13 years agoxz: Add support for threaded compression.
Lasse Collin [Mon, 11 Apr 2011 19:06:03 +0000 (22:06 +0300)]
xz: Add support for threaded compression.

13 years agoliblzma: Add lzma_stream_encoder_mt() for threaded compression.
Lasse Collin [Mon, 11 Apr 2011 19:03:30 +0000 (22:03 +0300)]
liblzma: Add lzma_stream_encoder_mt() for threaded compression.

This is the simplest method to do threading, which splits
the uncompressed data into blocks and compresses them
independently from each other. There's room for improvement
especially to reduce the memory usage, but nevertheless,
this is a good start.

13 years agoliblzma: Add the forgotten lzma_lzma2_block_size().
Lasse Collin [Mon, 11 Apr 2011 18:15:07 +0000 (21:15 +0300)]
liblzma: Add the forgotten lzma_lzma2_block_size().

This should have been in 5eefc0086d24a65e136352f8c1d19cefb0cbac7a.

13 years agoliblzma: Document lzma_easy_(enc|dec)oder_memusage() better too.
Lasse Collin [Mon, 11 Apr 2011 18:04:13 +0000 (21:04 +0300)]
liblzma: Document lzma_easy_(enc|dec)oder_memusage() better too.

13 years agoliblzma: Document lzma_raw_(enc|dec)oder_memusage() better.
Lasse Collin [Mon, 11 Apr 2011 17:59:07 +0000 (20:59 +0300)]
liblzma: Document lzma_raw_(enc|dec)oder_memusage() better.

It didn't mention the return value that is used if
an error occurs.

13 years agoliblzma: Use memzero() to initialize supported_actions[].
Lasse Collin [Mon, 11 Apr 2011 16:28:18 +0000 (19:28 +0300)]
liblzma: Use memzero() to initialize supported_actions[].

This is cleaner and makes it simpler to add new members
to lzma_action enumeration.

13 years agoliblzma: API comment about lzma_allocator with threaded coding.
Lasse Collin [Mon, 11 Apr 2011 16:26:27 +0000 (19:26 +0300)]
liblzma: API comment about lzma_allocator with threaded coding.

13 years agoliblzma: Add an internal function lzma_mt_block_size().
Lasse Collin [Mon, 11 Apr 2011 16:16:30 +0000 (19:16 +0300)]
liblzma: Add an internal function lzma_mt_block_size().

This is based lzma_chunk_size() that was included in some
development version of liblzma.

13 years agoliblzma: Don't create an empty Block in lzma_stream_buffer_encode().
Lasse Collin [Mon, 11 Apr 2011 10:59:50 +0000 (13:59 +0300)]
liblzma: Don't create an empty Block in lzma_stream_buffer_encode().

Empty Block was created if the input buffer was empty.
Empty Block wastes a few bytes of space, but more importantly
it triggers a bug in XZ Utils 5.0.1 and older when trying
to decompress such a file. 5.0.1 and older consider such
files to be corrupt. I thought that no encoder creates empty
Blocks when releasing 5.0.2 but I was wrong.

13 years agoliblzma: Fix API docs to mention LZMA_UNSUPPORTED_CHECK.
Lasse Collin [Mon, 11 Apr 2011 10:28:40 +0000 (13:28 +0300)]
liblzma: Fix API docs to mention LZMA_UNSUPPORTED_CHECK.

This return value was missing from the API comments of
four functions.

13 years agoliblzma: Validate encoder arguments better.
Lasse Collin [Mon, 11 Apr 2011 10:21:28 +0000 (13:21 +0300)]
liblzma: Validate encoder arguments better.

The biggest problem was that the integrity check type
wasn't validated, and e.g. lzma_easy_buffer_encode()
would create a corrupt .xz Stream if given an unsupported
Check ID. Luckily applications don't usually try to use
an unsupport Check ID, so this bug is unlikely to cause
many real-world problems.

13 years agoxz: Move the description of --block-size in --long-help.
Lasse Collin [Mon, 11 Apr 2011 06:57:30 +0000 (09:57 +0300)]
xz: Move the description of --block-size in --long-help.

13 years agoDocs: Document --single-stream and --block-size.
Lasse Collin [Mon, 11 Apr 2011 06:55:35 +0000 (09:55 +0300)]
Docs: Document --single-stream and --block-size.

13 years agoliblzma: Make lzma_stream_encoder_init() static (second try).
Lasse Collin [Mon, 11 Apr 2011 06:27:57 +0000 (09:27 +0300)]
liblzma: Make lzma_stream_encoder_init() static (second try).

It's an internal function and it's not needed by
anything outside stream_encoder.c.

13 years agoRevert "liblzma: Make lzma_stream_encoder_init() static."
Lasse Collin [Mon, 11 Apr 2011 05:31:42 +0000 (08:31 +0300)]
Revert "liblzma: Make lzma_stream_encoder_init() static."

This reverts commit 352ac82db5d3f64585c07b39e4759388dec0e4d7.
I don't know what I was thinking.

13 years agoRevise mythread.h.
Lasse Collin [Sun, 10 Apr 2011 18:23:21 +0000 (21:23 +0300)]
Revise mythread.h.

This adds:

  - mythread_sync() macro to create synchronized blocks

  - mythread_cond structure and related functions
    and macros for condition variables with timed
    waiting using a relative timeout

  - mythread_create() to create a thread with all
    signals blocked

Some of these wouldn't need to be inline functions,
but I'll keep them this way for now for simplicity.

For timed waiting on a condition variable, librt is
now required on some systems to use clock_gettime().
configure.ac was updated to handle this.