aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/bzip2.xml
blob: 742f63bff48c705229973aad730ece77ff419e4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../general.ent">
  %general-entities;
]>
<sect1 id="ch-system-bzip2" xreflabel="Bzip2" role="wrap">
<title>Bzip2-&bzip2-version;</title>
<?dbhtml filename="bzip2.html"?>

<indexterm zone="ch-system-bzip2"><primary sortas="a-Bzip2">Bzip2</primary></indexterm>

<sect2 role="package"><title/>
<para>The Bzip2 package contains programs for compressing and decompressing
files. On text files they achieve a much better compression than the
traditional <command>gzip</command>.</para>

<segmentedlist>
<segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
<seglistitem><seg>0.1 SBU</seg><seg>3.0 MB</seg></seglistitem>
</segmentedlist>

<segmentedlist>
<segtitle>Bzip2 installation depends on</segtitle>
<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
GCC, Glibc, Make</seg></seglistitem>
</segmentedlist>
</sect2>

<sect2 role="installation">
<title>Installation of Bzip2</title>

<para>Prepare Bzip2 for compilation with:</para>

<screen><userinput>make -f Makefile-libbz2_so
make clean</userinput></screen>

<para>The <emphasis>-f</emphasis> flag will cause Bzip2 to be built
using a different <filename>Makefile</filename> file, in this case the
<filename>Makefile-libbz2_so</filename> file, which creates a dynamic
<filename>libbz2.so</filename> library and links the Bzip2 utilities
against it.</para>

<para>Compile the package:</para>

<screen><userinput>make</userinput></screen>

<para>If you are reinstalling Bzip2, you need to do
<userinput>rm -f /usr/bin/bz*</userinput> first, otherwise the following
<command>make install</command> will fail.</para>

<para>Install the programs:</para>

<screen><userinput>make install</userinput></screen>

<para>Now install the shared <command>bzip2</command> binary into the
<filename class="directory">/bin</filename> directory, then make some
necessary symbolic links, and clean up:</para>

<screen><userinput>cp bzip2-shared /bin/bzip2
cp -a libbz2.so* /lib
ln -s ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so
rm /usr/bin/{bunzip2,bzcat,bzip2}
ln -s bzip2 /bin/bunzip2
ln -s bzip2 /bin/bzcat</userinput></screen>

</sect2>


<sect2 id="contents-bzip2"><title>Contents of Bzip2</title>

<para><emphasis>Installed programs</emphasis>: bunzip2 (link to bzip2), bzcat
(link to bzip2), bzcmp, bzdiff, bzegrep, bzfgrep, bzgrep, bzip2, bzip2recover,
bzless and bzmore</para>

<para><emphasis>Installed libraries</emphasis>: libbz2.a, libbz2.so (link to
libbz2.so.1.0), libbz2.so.1.0 (link to libbz2.so.&bzip2-version;) and
libbz2.so.&bzip2-version;</para>

</sect2>

<sect2><title>Short descriptions</title>

<indexterm zone="ch-system-bzip2 bunzip2"><primary sortas="b-bunzip2">bunzip2</primary></indexterm>
<para id="bunzip2"><command>bunzip2</command> decompresses bzipped files.</para>

<indexterm zone="ch-system-bzip2 bzcat"><primary sortas="b-bzcat">bzcat</primary></indexterm>
<para id="bzcat"><command>bzcat</command> decompresses to standard output.</para>

<indexterm zone="ch-system-bzip2 bzcmp"><primary sortas="b-bzcmp">bzcmp</primary></indexterm>
<para id="bzcmp"><command>bzcmp</command> runs cmp on bzipped files.</para>

<indexterm zone="ch-system-bzip2 bzdiff"><primary sortas="b-bzdiff">bzdiff</primary></indexterm>
<para id="bzdiff"><command>bzdiff</command> runs diff on bzipped files.</para>

<indexterm zone="ch-system-bzip2 bzgrep"><primary sortas="b-bzgrep">bzgrep</primary></indexterm>
<para id="bzgrep"><command>bzgrep</command> and friends run grep on bzipped files.</para>

<indexterm zone="ch-system-bzip2 bzip2"><primary sortas="b-bzip2">bzip2</primary></indexterm>
<para id="bzip2"><command>bzip2</command> compresses files using the Burrows-Wheeler
block sorting text compression algorithm with Huffman coding. The compression
rate is generally considerably better than that achieved by more conventional
compressors using LZ77/LZ78, like <command>gzip</command>.</para>

<indexterm zone="ch-system-bzip2 bzip2recover"><primary sortas="b-bzip2recover">bzip2recover</primary></indexterm>
<para id="bzip2recover"><command>bzip2recover</command> tries to recover data from damaged
bzip2 files.</para>

<indexterm zone="ch-system-bzip2 bzless"><primary sortas="b-bzless">bzless</primary></indexterm>
<para id="bzless"><command>bzless</command> runs less on bzipped files.</para>

<indexterm zone="ch-system-bzip2 bzmore"><primary sortas="b-bzmore">bzmore</primary></indexterm>
<para id="bzmore"><command>bzmore</command> runs more on bzipped files.</para>

<indexterm zone="ch-system-bzip2 libbz2"><primary sortas="c-libbz2*">libbz2*</primary></indexterm>
<para id="libbz2"><command>libbz2*</command> is the library implementing lossless,
block-sorting data compression, using the Burrows-Wheeler algorithm.</para>

</sect2>



</sect1>