Lasse Collin | 12 May 2013 20:18
Favicon

XZ for Java 1.3

XZ for Java 1.3 is available at <http://tukaani.org/xz/java.html> and
in the Maven Central (groupId = org.tukaani, artifactId = xz). Here is
an extract from the NEWS file:

  * Fix a data corruption bug when flushing the LZMA2 encoder or
    when using a preset dictionary.

  * Make information about the XZ Block positions and sizes available
    in SeekableXZInputStream by adding the following public functions:
      - int getStreamCount()
      - int getBlockCount()
      - long getBlockPos(int blockNumber)
      - long getBlockSize(int blockNumber)
      - long getBlockCompPos(int blockNumber)
      - long getBlockCompSize(int blockNumber)
      - int getBlockCheckType(int blockNumber)
      - int getBlockNumber(long pos)
      - void seekToBlock(int blockNumber)

  * Minor improvements to javadoc comments were made.

--

-- 
Lasse Collin  |  IRC: Larhzu  <at>  IRCnet & Freenode

Pavel Raiskup | 9 Apr 2013 12:42
Picon
Favicon

Sync manual page and --help

Hi, there was done regular man/--help scan in Fedora and there were found
several inconsistencies in xz package.  Some of them I'll fix in Fedora
using this patch (could you consider it also upstream?):

  [PATCH] doc: man and --help/--long-help sync

Feel free to pick whatever part of this patch.

Thanks,
Pavel

Pavel Raiskup | 3 Apr 2013 14:03
Picon
Favicon

xzgrep and '-h' option

Hi all, would you please consider the following patch?  It is adding
support for the '-h' grep option into xzgrep also.  The author is Jeff
Bastian.
----------------------------------------------------------------------

From e7c8c8ddb186a450bc0bc61d1f1e694d9e89d08b Mon Sep 17 00:00:00 2001
From: Jeff Bastian <jbastian@...>
Date: Wed, 3 Apr 2013 13:59:17 +0200
Subject: [PATCH] xzgrep: make the '-h' option to be --no-filename equivalent

* src/scripts/xzgrep.in: Accept the '-h' option in argument parsing.
---
 src/scripts/xzgrep.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/scripts/xzgrep.in b/src/scripts/xzgrep.in
index d8e9bb5..951266b 100644
--- a/src/scripts/xzgrep.in
+++ b/src/scripts/xzgrep.in
 <at>  <at>  -109,7 +109,7  <at>  <at>  while test $# -ne 0; do
     files_with_matches=1;;
   (-L | --files-witho*)
     files_without_matches=1;;
-  (--no-f*)
+  (-h | --no-f*)
     no_filename=1;;
   (-V | --v | --ve | --ver | --vers | --versi | --versio | --version)
     echo "$version" || exit 2
--

-- 
1.8.1.4
(Continue reading)

Ariel P | 4 Mar 2013 20:45

[PATCH] xzless: There is no need to call awk for this.

---
  src/scripts/xzless.in | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/scripts/xzless.in b/src/scripts/xzless.in
index 9bc9706..288dd87 100644
--- a/src/scripts/xzless.in
+++ b/src/scripts/xzless.in
 <at>  <at>  -46,8 +46,7  <at>  <at>  if test "${LESSMETACHARS+set}" != set; then
         LESSMETACHARS="$space$tab$nl'"';*?"()<>[|&^`#\$%=~'
  fi

-less_ver=$(less -V | awk '/^less ([0-9]+)( \(.*\))?$/ { print $2; exit }')
-if test -n "$less_ver" && test "$less_ver" -ge 429; then
+if test "$(less -V | { read less ver re && echo ${ver}; })" -ge 429; then
         # less 429 or later: LESSOPEN pipe will be used on
         # standard input if $LESSOPEN begins with |-.
         LESSOPEN="|-$xz -cdfq -- %s"
--
1.8.1.5

Lasse Collin | 29 Jan 2013 15:35
Favicon

XZ for Java 1.2

XZ for Java 1.2 is available at <http://tukaani.org/xz/java.html> and
in the Maven Central (groupId = org.tukaani, artifactId = xz). Here is
an extract from the NEWS file:

  * Use fields instead of reallocating frequently-needed temporary
    objects in the LZMA encoder.

  * Fix the contents of xz-${version}-sources.jar.

  * Add OSGi attributes to xz.jar.

--

-- 
Lasse Collin  |  IRC: Larhzu  <at>  IRCnet & Freenode

Mikolaj Izdebski | 4 Jan 2013 20:58
Picon
Favicon

[PATCH] Add manifest attributes required by OSGi

For xz-java to be usable as an OSGi bundle certain attributes
required by the OSGi specification need to be present in the
manifest.
---
 build.properties | 4 ++++
 build.xml        | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/build.properties b/build.properties
index 6801a9d..2d45e8e 100644
--- a/build.properties
+++ b/build.properties
 <at>  <at>  -27,3 +27,7  <at>  <at>  extdoc_dir = extdoc

 pom_template = maven/pom_template.xml
 maven_dir = ${build_dir}/maven
+
+# OSGi metadata
+bundle_name = org.tukaani.xz
+export_packages = org.tukaani.xz
diff --git a/build.xml b/build.xml
index 9f25d27..734d2dd 100644
--- a/build.xml
+++ b/build.xml
 <at>  <at>  -64,6 +64,10  <at>  <at> 
                 <attribute name="Implementation-Version" value="${version}"/>
                 <attribute name="Implementation-URL" value="${homepage}"/>
                 <attribute name="Sealed" value="true"/>
+                <!-- Attributes required for OSGi bundles. -->
+                <attribute name="Bundle-SymbolicName" value="${bundle_name}"/>
(Continue reading)

Jack Duston | 15 Nov 2012 01:52
Picon

random-access reading and the "--block-size" option

Hi Lasse,

Thanks very much for a fantastic utility.  I am very eager to compress 
some files to allow random-access reading, but I see that the command 
option "--block-size" is not in the stable 5.0.4 release.

Some info as to my predicament:

     The files to be compressed range in size from 100GB-120GB.
     Compressing with the verbose option estimates it will take about a 
day to compress each file.
     There are over 100TB of files, so it is unlikely that if I can only 
compress them as a single block now, that I will ever get to 
decompress/recompress them when 5.1 development branch becomes stable.

Given time involved in compressing and the quantity of data, I am 
hesitant to use the 5.1.2alpha code.
I am paying attention when your web page says it should be considered 
unstable!

I see in the Release Notes that the "--block-size" option was added to 
the April, 2011 alpha release, and we are fast approaching 2013.
I don't know how complex the code change is, or if it goes against your 
release policy, but would you consider back-porting the "--block-size" 
option to a 5.0.5 Stable Release?  I surely can't be the only one who 
would love to make use of the option.

My ultimate end is to incorporate the XZ library or Embedded into our 
application to search and read the compressed files directly.
In any case, thanks again for all the work you've put into xz, I will be 
(Continue reading)

John Reiser | 9 Oct 2012 22:59

cache-aware match finder for blocks of 2**17 bytes

Hi,

I'm interested in speeding up compression for mksquashfs, which uses
independent blocks of input length 2**17 bytes.  I have in mind a
specialized match finder which would take advantage of the small
fixed block size, and tailor its memory usage to the common L2 cache
size of 256KB.  Is anyone else looking into this?

--

-- 

Mike Melanson | 21 Jul 2012 08:18

Showing off XZ Embedded in a new project

A few months ago, this list helped me get XZ Embedded working in a new 
project. I just wanted to show off the project now. :)

The overall project is to allow people to play old video game music 
(often called chiptunes) in their web browser using Google Chrome's 
Native Client framework. Since NaCl is all about adapting existing C/C++ 
code into web applications, I used XZ Embedded and recompressed the vast 
corpus of game music using XZ for delivery.

Here is the code for the project:

https://github.com/multimediamike/SaltyGME

Here is the website-- definitely check it out if you're a fan of old 
game music:

http://gamemusic.multimedia.cx/

And here is a write-up of some of the space savings I achieved thanks to 
XZ Embedded:

http://multimedia.cx/eggs/zlib-vs-xz-on-2sf/

BTW, thanks for XZ Embedded!
--

-- 
     -Mike Melanson

Lasse Collin | 5 Jul 2012 08:16
Favicon

XZ for Java 1.1

XZ for Java 1.1 is available at <http://tukaani.org/xz/java.html> and
in the Maven Central (groupId = org.tukaani, artifactId = xz). Here is
an extract from the NEWS file:

  * The depthLimit argument in the LZMA2Options constructor is
    no longer ignored.

  * LZMA2Options() can no longer throw UnsupportedOptionsException.

  * Fix bugs in the preset dictionary support in the LZMA2 encoder.

--

-- 
Lasse Collin  |  IRC: Larhzu  <at>  IRCnet & Freenode

Lasse Collin | 4 Jul 2012 20:10
Favicon

XZ Utils 5.1.2alpha

XZ Utils 5.1.2alpha is available at <http://tukaani.org/xz/>. Here is
an extract from the NEWS file:

  * All fixes from 5.0.3 and 5.0.4

  * liblzma:

      - Fixed a deadlock and an invalid free() in the threaded
        encoder.

      - Added support for symbol versioning. It is enabled by default
        on GNU/Linux, other GNU-based systems, and FreeBSD.

      - Use SHA-256 implementation from the operating system if one is
        available in libc, libmd, or libutil. liblzma won't use e.g.
        OpenSSL or libgcrypt to avoid introducing new dependencies.

      - Fixed liblzma.pc for static linking.

      - Fixed a few portability bugs.

  * xz --decompress --single-stream now fixes the input position after
    successful decompression. Now the following works:

        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
(Continue reading)


Gmane