Sie sind auf Seite 1von 4

XBW User Guide

4.6.2007

1 Program Description
Program XBW is intended for compression of XML les but can be used for all
les. The biggest advantage of this program is that the XML les do not have
to be valid XML les. It has very good compression ratio for any large text
les (better than bzip2, gzip or rar). It has good compression ratio for even not
textual large les with parser turned o.
The supported platforms are x86 running Windows XP and Linux. The
source code of XBW is written in C language and no platform specic features
have been used. Hence the code can be compiled on any platform, but may
require modications of compiler parameters.

2 System Requirements
The program supports les in Unicode. This feature is dependent on iconv
library which supports dozens of encodings1 . Hence you are required to have
libiconv installed on your system. If you want to compile the source you need
development version of the library. Iconv library is part of glibc on newer
installations of Linux systems.
XBW including installation of iconv will not require more than 20MB on
disk. Memory requirements depend on the le being compressed. We suggest
that your RAM is at least 10 times bigger than the le for compression. This
is highly dependent on method of compression used.
For compiling under Unix like systems Makele is provided, which requires
make tools. As compiler gcc has been tested.
The program uses both signed and unsigned integers and expects them to
have 4 bytes. If your system uses smaller size for these types please modify
denitions of types Int32 and UInt32 in le cong.h. This should not happen
on any PC newer than 10 years. For systems using 8 bytes, if you do not redene
the types, twice the memory needed will be used.
1 http://www.gnu.org/software/libiconv/

2.1 Program Limitations


The program supports only les smaller than 2GB. This limitation is due to use
of 4 byte integers.

3 Installation
3.1 Linux
Before installing XBW you need to have libiconv installed. In new versions
of glibc iconv is part of it. If not, you need to install iconv including headers
yourself. Only source code of XBW is provided at this time. So you have to
compile it yourself using Makele included in the source package and optionally
copy the xbw executable to any of the directories listed in your $PATH, e.g.
/usr/local/bin.

3.2 Windows
Although MS Windows is one of the supported platforms, we do not provide
neither windows installer nor windows executable at this time. If you'd like to
try XBW on Windows, you have to compile the source yourself. However, it is
probable that future versions of XBW will provide some simple installer.

4 Program Usage
4.1 Simple Examples
To compress a le called le into le le.xbw use:

xbw file
To decompress le.xbw into le use:

xbw -x file.xbw
or

xbw -d file.xbw
If no les are specied, the standard input is used for input and the standard
output for output:

xbw [-x]
For help use:

xbw -h
2

4.2 Specifying input and output


You can either specify the input and output using options -i= and -o= or
as last parameters to the program. The rst parameter not starting with - is
considered to be the input. If the string is equal to stdin or - standard input
is used. For any other value the program assumes le of that name. If another
parameter follows the input it is assumed to be specication of output. Strings
stdout and - are understood as standard output otherwise le of that name
will be created.
If no input is specied standard input is used as default.
If no output is specied the output is determined based on input. If standard
input is used than we use standard output. If le lename is specied that
program creates a le called lename.xbw.

4.3 Synopsis
xbw [ parameters ] [ input_le [ output_le ] ]

4.4 Parameters
-h

Display help with lists of supported variants for parameters.

-x -d

Decompress.

-i= < lename | - | stdin > Another way to specify input. Use stdin if you want
input to go from standard input.
-o= < lename | - | stdout > Another way to specify output. Use stdout if you
want output to go to standard output.
le_coding= < encoding > Specify encoding of the le to be compressed.
UTF-8 is default. BINARY is safe for all les. Help shows list
of currently supported encodings.
Parser= < on / o > Use on to use parser. Use o to turn the parser o.
Using parser makes sense only for text les.
Syl_partition= < variant > Specify which partiting of words to use. The best
method depends on the language and size of the le. Use help for
the list.
BWT= < variant / o > Specify algorithm to be used for Burrows-Wheeler
Transform. All produce the same results, but their speed is dient.
Their relative speed depends on the le size and its repetitiveness.
Sadakane is used as default, because of its robustness and good
performance. Use help for the list.
MTF= < on / o > Specify whether to use Move-To-Front algorithm. Defaultly turned on.
3

RLE= < variant / o > Run-Length Encoding. Default variant is 3. Only


one of the RLE/LZ/PPM can be used.Use help for the list.
LZ= < variant / o > Lempel-Ziv algorithms. By default it is turned o.
Only one of the RLE/LZ/PPM can be used. Use help for the list.
PPM= < on / o > Prediction by Partial Match algorithm. Defaultly turned
o. Only one of the RLE/LZ/PPM can be used. Beware of memory
requirements.
PPM_exclusions= < on / o > Specify whether to use exclusions. Defaultly
turned o.
PPM_order= < number > Specify the length of contexes that the PPM will
work with. Beware that PPM uses lots of memory with high values
of PPM_order.

Das könnte Ihnen auch gefallen