123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
- <!ENTITY % general-entities SYSTEM "../general.ent">
- %general-entities;
- ]>
- <sect1 id="ch-system-bzip2" role="wrap">
- <?dbhtml filename="bzip2.html"?>
- <sect1info condition="script">
- <productname>bzip2</productname>
- <productnumber>&bzip2-version;</productnumber>
- <address>&bzip2-url;</address>
- </sect1info>
- <title>Bzip2-&bzip2-version;</title>
- <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. Compressing text files with <command>bzip2</command> yields a much
- better compression percentage than with the traditional
- <command>gzip</command>.</para-->
- <para>Bzip2 软件包包含用于压缩和解压缩文件的程序。使用
- <command>bzip2</command> 压缩文本文件可以获得比传统的
- <command>gzip</command> 高到不知哪里去的压缩率。</para>
- <segmentedlist>
- <segtitle>&buildtime;</segtitle>
- <segtitle>&diskspace;</segtitle>
- <seglistitem>
- <seg>&bzip2-ch6-sbu;</seg>
- <seg>&bzip2-ch6-du;</seg>
- </seglistitem>
- </segmentedlist>
- </sect2>
- <sect2 role="installation">
- <title>安装 Bzip2</title>
- <para>应用一个补丁,以安装该软件包的文档:</para>
- <screen><userinput remap="pre">patch -Np1 -i ../&bzip2-docs-patch;</userinput></screen>
- <para>以下命令保证安装的符号链接是相对的:</para>
- <screen><userinput remap="pre">sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile</userinput></screen>
- <para>确保 man 页面被安装到正确位置:</para>
- <screen><userinput remap="pre">sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile</userinput></screen>
- <para>执行以下命令,准备编译 Bzip2:</para>
- <screen><userinput remap="make">make -f Makefile-libbz2_so
- make clean</userinput></screen>
- <variablelist>
- <title>make 命令参数的含义:</title>
- <varlistentry>
- <term><parameter>-f Makefile-libbz2_so</parameter></term>
- <listitem>
- <!--para>This 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 class="libraryfile">libbz2.so</filename> library and links
- the Bzip2 utilities against it.</para-->
- <para>该命令使用一个不同的 <filename>Makefile</filename>
- 文件构建 Bzip2,对于我们的例子来说就是使用
- <filename>Makefile-libbz2_so</filename> 文件。
- 它创建一个共享库
- <filename class="libraryfile">libbz2.so</filename>,
- 并将 Bzip2 工具链接到这个库。</para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>编译并测试该软件包:</para>
- <screen><userinput remap="make">make</userinput></screen>
- <para>安装软件包中的程序:</para>
- <screen><userinput remap="install">make PREFIX=/usr install</userinput></screen>
- <para>安装链接到共享库的 <command>bzip2</command> 二进制程序到
- <filename class="directory">/bin</filename> 目录,
- 创建必要的符号链接,并进行清理:</para>
- <screen><userinput remap="install">cp -v bzip2-shared /bin/bzip2
- cp -av libbz2.so* /lib
- ln -sv ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so
- rm -v /usr/bin/{bunzip2,bzcat,bzip2}
- ln -sv bzip2 /bin/bunzip2
- ln -sv bzip2 /bin/bzcat</userinput></screen>
- </sect2>
- <sect2 id="contents-bzip2" role="content">
- <title>Bzip2 的内容</title>
- <segmentedlist>
- <segtitle>安装的程序</segtitle>
- <segtitle>安装的库</segtitle>
- <segtitle>安装的目录</segtitle>
- <seglistitem>
- <seg>bunzip2 (链接到 bzip2), bzcat (链接到 bzip2), bzcmp (链接到
- bzdiff), bzdiff, bzegrep (链接到 bzgrep), bzfgrep (链接到 bzgrep),
- bzgrep, bzip2, bzip2recover, bzless (链接到bzmore),
- 以及 bzmore</seg>
- <seg>libbz2.{a,so}</seg>
- <seg>/usr/share/doc/bzip2-&bzip2-version;</seg>
- </seglistitem>
- </segmentedlist>
- <variablelist>
- <bridgehead renderas="sect3">简要描述</bridgehead>
- <?dbfo list-presentation="list"?>
- <?dbhtml list-presentation="table"?>
- <varlistentry id="bunzip2">
- <term><command>bunzip2</command></term>
- <listitem>
- <para>解压缩 bzip 压缩文件</para>
- <indexterm zone="ch-system-bzip2 bunzip2">
- <primary sortas="b-bunzip2">bunzip2</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="bzcat">
- <term><command>bzcat</command></term>
- <listitem>
- <para>解压缩到标准输出</para>
- <indexterm zone="ch-system-bzip2 bzcat">
- <primary sortas="b-bzcat">bzcat</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="bzcmp">
- <term><command>bzcmp</command></term>
- <listitem>
- <para>对 bzip 压缩过的文件运行 <command>cmp</command></para>
- <indexterm zone="ch-system-bzip2 bzcmp">
- <primary sortas="b-bzcmp">bzcmp</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="bzdiff">
- <term><command>bzdiff</command></term>
- <listitem>
- <para>对 bzip 压缩过的文件运行 <command>diff</command></para>
- <indexterm zone="ch-system-bzip2 bzdiff">
- <primary sortas="b-bzdiff">bzdiff</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="bzegrep">
- <term><command>bzegrep</command></term>
- <listitem>
- <para>对 bzip 压缩过的文件运行 <command>egrep</command> 命令</para>
- <indexterm zone="ch-system-bzip2 bzegrep">
- <primary sortas="b-bzegrep">bzegrep</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="bzfgrep">
- <term><command>bzfgrep</command></term>
- <listitem>
- <para>对 bzip 压缩过的文件运行 <command>fgrep</command> 命令</para>
- <indexterm zone="ch-system-bzip2 bzfgrep">
- <primary sortas="b-bzfgrep">bzfgrep</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="bzgrep">
- <term><command>bzgrep</command></term>
- <listitem>
- <para>对 bzip 压缩过的文件运行 <command>grep</command> 命令</para>
- <indexterm zone="ch-system-bzip2 bzgrep">
- <primary sortas="b-bzgrep">bzgrep</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="bzip2">
- <term><command>bzip2</command></term>
- <listitem>
- <!--para>Compresses files using the Burrows-Wheeler block sorting text
- compression algorithm with Huffman coding; the compression rate is
- better than that achieved by more conventional compressors using
- <quote>Lempel-Ziv</quote> algorithms, like <command>gzip</command></para-->
- <para>使用 Burrows-Wheeler 块排序文本压缩算法和 Huffman
- 编码压缩文件;其压缩率优于更常见的使用
- <quote>Lempel-Ziv</quote> 算法的压缩工具,如
- <command>gzip</command></para>
- <indexterm zone="ch-system-bzip2 bzip2">
- <primary sortas="b-bzip2">bzip2</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="bzip2recover">
- <term><command>bzip2recover</command></term>
- <listitem>
- <para>试图从损坏的 bzip2 压缩文件中恢复数据</para>
- <indexterm zone="ch-system-bzip2 bzip2recover">
- <primary sortas="b-bzip2recover">bzip2recover</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="bzless">
- <term><command>bzless</command></term>
- <listitem>
- <para>对 bzip 压缩过的文件运行 <command>less</command> 命令</para>
- <indexterm zone="ch-system-bzip2 bzless">
- <primary sortas="b-bzless">bzless</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="bzmore">
- <term><command>bzmore</command></term>
- <listitem>
- <para>对 bzip 压缩过的文件运行 <command>more</command> 命令</para>
- <indexterm zone="ch-system-bzip2 bzmore">
- <primary sortas="b-bzmore">bzmore</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="libbz2">
- <term><filename class="libraryfile">libbz2</filename></term>
- <listitem>
- <para>这个库实现基于 Burrows-Wheeler 算法的无损块排序数据压缩
- </para>
- <indexterm zone="ch-system-bzip2 libbz2">
- <primary sortas="c-libbz2">libbz2</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- </variablelist>
- </sect2>
- </sect1>
|