1
0

bzip2.xml 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-bzip2" role="wrap">
  8. <?dbhtml filename="bzip2.html"?>
  9. <sect1info condition="script">
  10. <productname>bzip2</productname>
  11. <productnumber>&bzip2-version;</productnumber>
  12. <address>&bzip2-url;</address>
  13. </sect1info>
  14. <title>Bzip2-&bzip2-version;</title>
  15. <indexterm zone="ch-system-bzip2">
  16. <primary sortas="a-Bzip2">Bzip2</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <!--para>The Bzip2 package contains programs for compressing and decompressing
  21. files. Compressing text files with <command>bzip2</command> yields a much
  22. better compression percentage than with the traditional
  23. <command>gzip</command>.</para-->
  24. <para>Bzip2 软件包包含用于压缩和解压缩文件的程序。使用
  25. <command>bzip2</command> 压缩文本文件可以获得比传统的
  26. <command>gzip</command> 高到不知哪里去的压缩率。</para>
  27. <segmentedlist>
  28. <segtitle>&buildtime;</segtitle>
  29. <segtitle>&diskspace;</segtitle>
  30. <seglistitem>
  31. <seg>&bzip2-ch6-sbu;</seg>
  32. <seg>&bzip2-ch6-du;</seg>
  33. </seglistitem>
  34. </segmentedlist>
  35. </sect2>
  36. <sect2 role="installation">
  37. <title>安装 Bzip2</title>
  38. <para>应用一个补丁,以安装该软件包的文档:</para>
  39. <screen><userinput remap="pre">patch -Np1 -i ../&bzip2-docs-patch;</userinput></screen>
  40. <para>以下命令保证安装的符号链接是相对的:</para>
  41. <screen><userinput remap="pre">sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile</userinput></screen>
  42. <para>确保 man 页面被安装到正确位置:</para>
  43. <screen><userinput remap="pre">sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile</userinput></screen>
  44. <para>执行以下命令,准备编译 Bzip2:</para>
  45. <screen><userinput remap="make">make -f Makefile-libbz2_so
  46. make clean</userinput></screen>
  47. <variablelist>
  48. <title>make 命令参数的含义:</title>
  49. <varlistentry>
  50. <term><parameter>-f Makefile-libbz2_so</parameter></term>
  51. <listitem>
  52. <!--para>This will cause Bzip2 to be built using a different
  53. <filename>Makefile</filename> file, in this case the
  54. <filename>Makefile-libbz2_so</filename> file, which creates a dynamic
  55. <filename class="libraryfile">libbz2.so</filename> library and links
  56. the Bzip2 utilities against it.</para-->
  57. <para>该命令使用一个不同的 <filename>Makefile</filename>
  58. 文件构建 Bzip2,对于我们的例子来说就是使用
  59. <filename>Makefile-libbz2_so</filename> 文件。
  60. 它创建一个共享库
  61. <filename class="libraryfile">libbz2.so</filename>,
  62. 并将 Bzip2 工具链接到这个库。</para>
  63. </listitem>
  64. </varlistentry>
  65. </variablelist>
  66. <para>编译并测试该软件包:</para>
  67. <screen><userinput remap="make">make</userinput></screen>
  68. <para>安装软件包中的程序:</para>
  69. <screen><userinput remap="install">make PREFIX=/usr install</userinput></screen>
  70. <para>安装链接到共享库的 <command>bzip2</command> 二进制程序到
  71. <filename class="directory">/bin</filename> 目录,
  72. 创建必要的符号链接,并进行清理:</para>
  73. <screen><userinput remap="install">cp -v bzip2-shared /bin/bzip2
  74. cp -av libbz2.so* /lib
  75. ln -sv ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so
  76. rm -v /usr/bin/{bunzip2,bzcat,bzip2}
  77. ln -sv bzip2 /bin/bunzip2
  78. ln -sv bzip2 /bin/bzcat</userinput></screen>
  79. </sect2>
  80. <sect2 id="contents-bzip2" role="content">
  81. <title>Bzip2 的内容</title>
  82. <segmentedlist>
  83. <segtitle>安装的程序</segtitle>
  84. <segtitle>安装的库</segtitle>
  85. <segtitle>安装的目录</segtitle>
  86. <seglistitem>
  87. <seg>bunzip2 (链接到 bzip2), bzcat (链接到 bzip2), bzcmp (链接到
  88. bzdiff), bzdiff, bzegrep (链接到 bzgrep), bzfgrep (链接到 bzgrep),
  89. bzgrep, bzip2, bzip2recover, bzless (链接到bzmore),
  90. 以及 bzmore</seg>
  91. <seg>libbz2.{a,so}</seg>
  92. <seg>/usr/share/doc/bzip2-&bzip2-version;</seg>
  93. </seglistitem>
  94. </segmentedlist>
  95. <variablelist>
  96. <bridgehead renderas="sect3">简要描述</bridgehead>
  97. <?dbfo list-presentation="list"?>
  98. <?dbhtml list-presentation="table"?>
  99. <varlistentry id="bunzip2">
  100. <term><command>bunzip2</command></term>
  101. <listitem>
  102. <para>解压缩 bzip 压缩文件</para>
  103. <indexterm zone="ch-system-bzip2 bunzip2">
  104. <primary sortas="b-bunzip2">bunzip2</primary>
  105. </indexterm>
  106. </listitem>
  107. </varlistentry>
  108. <varlistentry id="bzcat">
  109. <term><command>bzcat</command></term>
  110. <listitem>
  111. <para>解压缩到标准输出</para>
  112. <indexterm zone="ch-system-bzip2 bzcat">
  113. <primary sortas="b-bzcat">bzcat</primary>
  114. </indexterm>
  115. </listitem>
  116. </varlistentry>
  117. <varlistentry id="bzcmp">
  118. <term><command>bzcmp</command></term>
  119. <listitem>
  120. <para>对 bzip 压缩过的文件运行 <command>cmp</command></para>
  121. <indexterm zone="ch-system-bzip2 bzcmp">
  122. <primary sortas="b-bzcmp">bzcmp</primary>
  123. </indexterm>
  124. </listitem>
  125. </varlistentry>
  126. <varlistentry id="bzdiff">
  127. <term><command>bzdiff</command></term>
  128. <listitem>
  129. <para>对 bzip 压缩过的文件运行 <command>diff</command></para>
  130. <indexterm zone="ch-system-bzip2 bzdiff">
  131. <primary sortas="b-bzdiff">bzdiff</primary>
  132. </indexterm>
  133. </listitem>
  134. </varlistentry>
  135. <varlistentry id="bzegrep">
  136. <term><command>bzegrep</command></term>
  137. <listitem>
  138. <para>对 bzip 压缩过的文件运行 <command>egrep</command> 命令</para>
  139. <indexterm zone="ch-system-bzip2 bzegrep">
  140. <primary sortas="b-bzegrep">bzegrep</primary>
  141. </indexterm>
  142. </listitem>
  143. </varlistentry>
  144. <varlistentry id="bzfgrep">
  145. <term><command>bzfgrep</command></term>
  146. <listitem>
  147. <para>对 bzip 压缩过的文件运行 <command>fgrep</command> 命令</para>
  148. <indexterm zone="ch-system-bzip2 bzfgrep">
  149. <primary sortas="b-bzfgrep">bzfgrep</primary>
  150. </indexterm>
  151. </listitem>
  152. </varlistentry>
  153. <varlistentry id="bzgrep">
  154. <term><command>bzgrep</command></term>
  155. <listitem>
  156. <para>对 bzip 压缩过的文件运行 <command>grep</command> 命令</para>
  157. <indexterm zone="ch-system-bzip2 bzgrep">
  158. <primary sortas="b-bzgrep">bzgrep</primary>
  159. </indexterm>
  160. </listitem>
  161. </varlistentry>
  162. <varlistentry id="bzip2">
  163. <term><command>bzip2</command></term>
  164. <listitem>
  165. <!--para>Compresses files using the Burrows-Wheeler block sorting text
  166. compression algorithm with Huffman coding; the compression rate is
  167. better than that achieved by more conventional compressors using
  168. <quote>Lempel-Ziv</quote> algorithms, like <command>gzip</command></para-->
  169. <para>使用 Burrows-Wheeler 块排序文本压缩算法和 Huffman
  170. 编码压缩文件;其压缩率优于更常见的使用
  171. <quote>Lempel-Ziv</quote> 算法的压缩工具,如
  172. <command>gzip</command></para>
  173. <indexterm zone="ch-system-bzip2 bzip2">
  174. <primary sortas="b-bzip2">bzip2</primary>
  175. </indexterm>
  176. </listitem>
  177. </varlistentry>
  178. <varlistentry id="bzip2recover">
  179. <term><command>bzip2recover</command></term>
  180. <listitem>
  181. <para>试图从损坏的 bzip2 压缩文件中恢复数据</para>
  182. <indexterm zone="ch-system-bzip2 bzip2recover">
  183. <primary sortas="b-bzip2recover">bzip2recover</primary>
  184. </indexterm>
  185. </listitem>
  186. </varlistentry>
  187. <varlistentry id="bzless">
  188. <term><command>bzless</command></term>
  189. <listitem>
  190. <para>对 bzip 压缩过的文件运行 <command>less</command> 命令</para>
  191. <indexterm zone="ch-system-bzip2 bzless">
  192. <primary sortas="b-bzless">bzless</primary>
  193. </indexterm>
  194. </listitem>
  195. </varlistentry>
  196. <varlistentry id="bzmore">
  197. <term><command>bzmore</command></term>
  198. <listitem>
  199. <para>对 bzip 压缩过的文件运行 <command>more</command> 命令</para>
  200. <indexterm zone="ch-system-bzip2 bzmore">
  201. <primary sortas="b-bzmore">bzmore</primary>
  202. </indexterm>
  203. </listitem>
  204. </varlistentry>
  205. <varlistentry id="libbz2">
  206. <term><filename class="libraryfile">libbz2</filename></term>
  207. <listitem>
  208. <para>这个库实现基于 Burrows-Wheeler 算法的无损块排序数据压缩
  209. </para>
  210. <indexterm zone="ch-system-bzip2 libbz2">
  211. <primary sortas="c-libbz2">libbz2</primary>
  212. </indexterm>
  213. </listitem>
  214. </varlistentry>
  215. </variablelist>
  216. </sect2>
  217. </sect1>