bzip2.xml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. %general-entities;
  5. ]>
  6. <sect1 id="ch-system-bzip2" role="wrap">
  7. <title>Bzip2-&bzip2-version;</title>
  8. <?dbhtml filename="bzip2.html"?>
  9. <indexterm zone="ch-system-bzip2"><primary sortas="a-Bzip2">Bzip2</primary></indexterm>
  10. <sect2 role="package"><title/>
  11. <para>The Bzip2 package contains programs for compressing and decompressing
  12. files. Compressing text files with <command>bzip2</command> yields a much better
  13. compression percentage than with the traditional <command>gzip</command>.</para>
  14. <segmentedlist>
  15. <segtitle>&buildtime;</segtitle>
  16. <segtitle>&diskspace;</segtitle>
  17. <seglistitem><seg>0.1 SBU</seg><seg>3.9 MB</seg></seglistitem>
  18. </segmentedlist>
  19. <segmentedlist>
  20. <segtitle>&dependencies;</segtitle>
  21. <seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
  22. GCC, Glibc, and Make</seg></seglistitem>
  23. </segmentedlist>
  24. </sect2>
  25. <sect2 role="installation">
  26. <title>Installation of Bzip2</title>
  27. <para>Apply a patch to install the documentation for this package:</para>
  28. <screen><userinput>patch -Np1 -i ../&bzip2-docs-patch;</userinput></screen>
  29. <para>The <command>bzgrep</command> command does not escape '|' and '&amp;' in
  30. filenames passed to it. This allows arbitrary commands to be executed with the
  31. privileges of the user running <command>bzgrep</command>. Apply the following to
  32. address this:</para>
  33. <screen><userinput>patch -Np1 -i ../&bzip2-bzgrep-patch;</userinput></screen>
  34. <para>Prepare Bzip2 for compilation with:</para>
  35. <screen><userinput>make -f Makefile-libbz2_so
  36. make clean</userinput></screen>
  37. <para>The <parameter>-f</parameter> flag will cause Bzip2 to be built
  38. using a different <filename>Makefile</filename> file, in this case the
  39. <filename>Makefile-libbz2_so</filename> file, which creates a dynamic
  40. <filename class="libraryfile">libbz2.so</filename> library and links the Bzip2
  41. utilities against it.</para>
  42. <para>Compile and test the package:</para>
  43. <screen><userinput>make</userinput></screen>
  44. <para>If reinstalling Bzip2, perform
  45. <userinput>rm -vf /usr/bin/bz*</userinput> first, otherwise the following
  46. <command>make install</command> will fail.</para>
  47. <para>Install the programs:</para>
  48. <screen><userinput>make install</userinput></screen>
  49. <para>Install the shared <command>bzip2</command> binary into the
  50. <filename class="directory">/bin</filename> directory, make
  51. some necessary symbolic links, and clean up:</para>
  52. <screen><userinput>cp -v bzip2-shared /bin/bzip2
  53. cp -av libbz2.so* /lib
  54. ln -sv ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so
  55. rm -v /usr/bin/{bunzip2,bzcat,bzip2}
  56. ln -sv bzip2 /bin/bunzip2
  57. ln -sv bzip2 /bin/bzcat</userinput></screen>
  58. </sect2>
  59. <sect2 id="contents-bzip2" role="content"><title>Contents of Bzip2</title>
  60. <segmentedlist>
  61. <segtitle>Installed programs</segtitle>
  62. <segtitle>Installed libraries</segtitle>
  63. <seglistitem><seg>bunzip2 (link to bzip2), bzcat (link to bzip2), bzcmp, bzdiff,
  64. bzegrep, bzfgrep, bzgrep, bzip2, bzip2recover, bzless, and bzmore</seg>
  65. <seg>libbz2.[a,so]</seg></seglistitem>
  66. </segmentedlist>
  67. <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
  68. <?dbfo list-presentation="list"?>
  69. <?dbhtml list-presentation="table"?>
  70. <varlistentry id="bunzip2">
  71. <term><command>bunzip2</command></term>
  72. <listitem>
  73. <para>Decompresses bzipped files</para>
  74. <indexterm zone="ch-system-bzip2 bunzip2"><primary sortas="b-bunzip2">bunzip2</primary></indexterm>
  75. </listitem>
  76. </varlistentry>
  77. <varlistentry id="bzcat">
  78. <term><command>bzcat</command></term>
  79. <listitem>
  80. <para>Decompresses to standard output</para>
  81. <indexterm zone="ch-system-bzip2 bzcat"><primary sortas="b-bzcat">bzcat</primary></indexterm>
  82. </listitem>
  83. </varlistentry>
  84. <varlistentry id="bzcmp">
  85. <term><command>bzcmp</command></term>
  86. <listitem>
  87. <para>Runs <command>cmp</command> on bzipped files</para>
  88. <indexterm zone="ch-system-bzip2 bzcmp"><primary sortas="b-bzcmp">bzcmp</primary></indexterm>
  89. </listitem>
  90. </varlistentry>
  91. <varlistentry id="bzdiff">
  92. <term><command>bzdiff</command></term>
  93. <listitem>
  94. <para>Runs <command>diff</command> on bzipped files</para>
  95. <indexterm zone="ch-system-bzip2 bzdiff"><primary sortas="b-bzdiff">bzdiff</primary></indexterm>
  96. </listitem>
  97. </varlistentry>
  98. <varlistentry id="bzgrep">
  99. <term><command>bzgrep</command></term>
  100. <listitem>
  101. <para>Runs <command>grep</command> on bzipped files</para>
  102. <indexterm zone="ch-system-bzip2 bzgrep"><primary sortas="b-bzgrep">bzgrep</primary></indexterm>
  103. </listitem>
  104. </varlistentry>
  105. <varlistentry id="bzegrep">
  106. <term><command>bzegrep</command></term>
  107. <listitem>
  108. <para>Runs <command>egrep</command> on bzipped files</para>
  109. <indexterm zone="ch-system-bzip2 bzegrep"><primary sortas="b-bzegrep">bzegrep</primary></indexterm>
  110. </listitem>
  111. </varlistentry>
  112. <varlistentry id="bzfgrep">
  113. <term><command>bzfgrep</command></term>
  114. <listitem>
  115. <para>Runs <command>fgrep</command> on bzipped files</para>
  116. <indexterm zone="ch-system-bzip2 bzfgrep"><primary sortas="b-bzfgrep">bzfgrep</primary></indexterm>
  117. </listitem>
  118. </varlistentry>
  119. <varlistentry id="bzip2">
  120. <term><command>bzip2</command></term>
  121. <listitem>
  122. <para>Compresses files using the Burrows-Wheeler block sorting text
  123. compression algorithm with Huffman coding; the compression rate is
  124. better than that achieved by more conventional compressors using
  125. <quote>Lempel-Ziv</quote> algorithms, like <command>gzip</command></para>
  126. <indexterm zone="ch-system-bzip2 bzip2"><primary sortas="b-bzip2">bzip2</primary></indexterm>
  127. </listitem>
  128. </varlistentry>
  129. <varlistentry id="bzip2recover">
  130. <term><command>bzip2recover</command></term>
  131. <listitem>
  132. <para>Tries to recover data from damaged bzipped files</para>
  133. <indexterm zone="ch-system-bzip2 bzip2recover"><primary sortas="b-bzip2recover">bzip2recover</primary></indexterm>
  134. </listitem>
  135. </varlistentry>
  136. <varlistentry id="bzless">
  137. <term><command>bzless</command></term>
  138. <listitem>
  139. <para>Runs <command>less</command> on bzipped files</para>
  140. <indexterm zone="ch-system-bzip2 bzless"><primary sortas="b-bzless">bzless</primary></indexterm>
  141. </listitem>
  142. </varlistentry>
  143. <varlistentry id="bzmore">
  144. <term><command>bzmore</command></term>
  145. <listitem>
  146. <para>Runs <command>more</command> on bzipped files</para>
  147. <indexterm zone="ch-system-bzip2 bzmore"><primary sortas="b-bzmore">bzmore</primary></indexterm>
  148. </listitem>
  149. </varlistentry>
  150. <varlistentry id="libbz2">
  151. <term><filename class="libraryfile">libbz2*</filename></term>
  152. <listitem>
  153. <para>The library implementing lossless, block-sorting data
  154. compression, using the Burrows-Wheeler algorithm</para>
  155. <indexterm zone="ch-system-bzip2 libbz2"><primary sortas="c-libbz2*">libbz2*</primary></indexterm>
  156. </listitem>
  157. </varlistentry>
  158. </variablelist>
  159. </sect2>
  160. </sect1>