[ab4fdfc] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[47d5a9e5] | 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 |
|
---|
[95bf71b] | 7 | <!ENTITY brotli-download-http "https://github.com/google/brotli/archive/v&brotli-version;/brotli-&brotli-version;.tar.gz">
|
---|
[47d5a9e5] | 8 | <!ENTITY brotli-download-ftp " ">
|
---|
[748752de] | 9 | <!ENTITY brotli-md5sum "3a6a3dba82a3604792d3cb0bd41bca60">
|
---|
| 10 | <!ENTITY brotli-size "500 KB">
|
---|
| 11 | <!ENTITY brotli-buildsize "33 MB (with python3 bindings)">
|
---|
[8965351] | 12 | <!-- The python tests for this package are broken. The tarball is missing a lot of test files -->
|
---|
[748752de] | 13 | <!ENTITY brotli-time "0.3 SBU (with python3 bindings; parallelism=4)">
|
---|
[47d5a9e5] | 14 | ]>
|
---|
| 15 |
|
---|
| 16 | <sect1 id="brotli" xreflabel="Brotli-&brotli-version;">
|
---|
| 17 | <?dbhtml filename="brotli.html"?>
|
---|
| 18 |
|
---|
| 19 |
|
---|
[d7189a1c] | 20 | <title>brotli-&brotli-version;</title>
|
---|
[47d5a9e5] | 21 |
|
---|
| 22 | <indexterm zone="brotli">
|
---|
| 23 | <primary sortas="a-brotli">Brotli</primary>
|
---|
| 24 | </indexterm>
|
---|
| 25 |
|
---|
| 26 | <sect2 role="package">
|
---|
| 27 | <title>Introduction to Brotli</title>
|
---|
| 28 |
|
---|
| 29 | <para>
|
---|
| 30 | <application>Brotli</application> provides a general-purpose lossless
|
---|
| 31 | compression algorithm that compresses data using a combination of a
|
---|
| 32 | modern variant of the LZ77 algorithm, Huffman coding and 2nd order
|
---|
| 33 | context modeling. Its libraries are particularly used for WOFF2 fonts
|
---|
| 34 | on webpages.
|
---|
| 35 | </para>
|
---|
| 36 |
|
---|
[f4734425] | 37 | &lfs122_checked;
|
---|
[47d5a9e5] | 38 |
|
---|
| 39 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 40 | <itemizedlist spacing="compact">
|
---|
| 41 | <listitem>
|
---|
| 42 | <para>
|
---|
| 43 | Download (HTTP): <ulink url="&brotli-download-http;"/>
|
---|
| 44 | </para>
|
---|
| 45 | </listitem>
|
---|
| 46 | <listitem>
|
---|
| 47 | <para>
|
---|
| 48 | Download (FTP): <ulink url="&brotli-download-ftp;"/>
|
---|
| 49 | </para>
|
---|
| 50 | </listitem>
|
---|
| 51 | <listitem>
|
---|
| 52 | <para>
|
---|
| 53 | Download MD5 sum: &brotli-md5sum;
|
---|
| 54 | </para>
|
---|
| 55 | </listitem>
|
---|
| 56 | <listitem>
|
---|
| 57 | <para>
|
---|
| 58 | Download size: &brotli-size;
|
---|
| 59 | </para>
|
---|
| 60 | </listitem>
|
---|
| 61 | <listitem>
|
---|
| 62 | <para>
|
---|
| 63 | Estimated disk space required: &brotli-buildsize;
|
---|
| 64 | </para>
|
---|
| 65 | </listitem>
|
---|
| 66 | <listitem>
|
---|
| 67 | <para>
|
---|
| 68 | Estimated build time: &brotli-time;
|
---|
| 69 | </para>
|
---|
| 70 | </listitem>
|
---|
| 71 | </itemizedlist>
|
---|
[2e18e741] | 72 |
|
---|
[47d5a9e5] | 73 | <bridgehead renderas="sect3">Brotli Dependencies</bridgehead>
|
---|
| 74 |
|
---|
[748752de] | 75 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 76 | <para role="required">
|
---|
[47d5a9e5] | 77 | <xref linkend="cmake"/>
|
---|
| 78 | </para>
|
---|
| 79 |
|
---|
[4f52b38] | 80 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 81 | <para role="optional">
|
---|
[921174d5] | 82 | <!--<xref linkend="pluggy"/> and-->
|
---|
| 83 | <!-- Pluggy is a required dependency of pytest -->
|
---|
[4f52b38] | 84 | <xref linkend="pytest"/> (for testing Python3 bindings)
|
---|
| 85 | </para>
|
---|
| 86 |
|
---|
[47d5a9e5] | 87 | </sect2>
|
---|
| 88 |
|
---|
| 89 | <sect2 role="installation">
|
---|
| 90 | <title>Installation of Brotli</title>
|
---|
| 91 |
|
---|
| 92 | <para>
|
---|
| 93 | Install <application>brotli</application> by running the following
|
---|
| 94 | commands:
|
---|
| 95 | </para>
|
---|
| 96 |
|
---|
[748752de] | 97 | <screen><userinput>mkdir build &&
|
---|
| 98 | cd build &&
|
---|
[47d5a9e5] | 99 |
|
---|
[cbfa153] | 100 | cmake -D CMAKE_INSTALL_PREFIX=/usr \
|
---|
| 101 | -D CMAKE_BUILD_TYPE=Release \
|
---|
[47d5a9e5] | 102 | .. &&
|
---|
| 103 | make</userinput></screen>
|
---|
| 104 |
|
---|
| 105 | <para>
|
---|
[2754eaf] | 106 | To test the results, issue: <command>make test</command>.
|
---|
[47d5a9e5] | 107 | </para>
|
---|
| 108 |
|
---|
[1fe05eb] | 109 | <!-- These are broken
|
---|
[47d5a9e5] | 110 | <para>
|
---|
[8965351] | 111 | The python tests are missing most of the necessary testdata files and
|
---|
| 112 | therefore 240 of 311 tests fail.
|
---|
| 113 | If you nevertheless wish to test the bindings, go back to the top-level directory and
|
---|
[822c1eb5] | 114 | issue: <command>python3 setup.py test</command>.
|
---|
[47d5a9e5] | 115 | </para>
|
---|
[caee73e9] | 116 | -->
|
---|
[47d5a9e5] | 117 | <para>
|
---|
| 118 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 119 | </para>
|
---|
| 120 |
|
---|
[748752de] | 121 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 122 |
|
---|
| 123 | <para>
|
---|
| 124 | If desired, build the <application>Python3</application>
|
---|
| 125 | bindings:
|
---|
| 126 | </para>
|
---|
| 127 |
|
---|
| 128 | <screen><userinput>cd .. &&
|
---|
[4f52b38] | 129 | sed "/c\/.*\.[ch]'/d;\
|
---|
| 130 | /include_dirs=\[/\
|
---|
| 131 | i libraries=['brotlicommon','brotlidec','brotlienc']," \
|
---|
| 132 | -i setup.py &&
|
---|
[4395529] | 133 | &build-wheel-cmd; $PWD</userinput></screen>
|
---|
[47d5a9e5] | 134 |
|
---|
[caee73e9] | 135 | <para>
|
---|
[748752de] | 136 | Install the <application>Python3</application>
|
---|
[caee73e9] | 137 | bindings as the &root; user:
|
---|
| 138 | </para>
|
---|
| 139 |
|
---|
[4395529] | 140 | <screen role="root"><userinput>&install-wheel; Brotli</userinput></screen>
|
---|
[47d5a9e5] | 141 |
|
---|
[4f52b38] | 142 | <!-- "131 passed in 2.76s" for me with 1.1.0 -->
|
---|
| 143 | <para>
|
---|
| 144 | To test the <application>Python3</application> binding, issue:
|
---|
| 145 | <command>pytest</command>.
|
---|
| 146 | </para>
|
---|
| 147 | </sect2>
|
---|
| 148 |
|
---|
| 149 | <sect2 role="commands">
|
---|
| 150 | <title>Command Explanations</title>
|
---|
| 151 |
|
---|
| 152 | <!-- https://github.com/google/brotli/issues/933 -->
|
---|
| 153 | <para>
|
---|
| 154 | <command>sed ... -i setup.py</command>: Stop
|
---|
| 155 | <filename>setup.py</filename> from rebuilding the entire package all
|
---|
| 156 | over again, use the already installed libraries for the
|
---|
| 157 | <application>Python3</application> binding instead.
|
---|
| 158 | </para>
|
---|
| 159 |
|
---|
[47d5a9e5] | 160 | </sect2>
|
---|
| 161 |
|
---|
| 162 | <sect2 role="content">
|
---|
| 163 | <title>Contents</title>
|
---|
| 164 |
|
---|
| 165 | <segmentedlist>
|
---|
| 166 | <segtitle>Installed Programs</segtitle>
|
---|
| 167 | <segtitle>Installed Libraries</segtitle>
|
---|
[cb40a58] | 168 | <segtitle>Installed Directories</segtitle>
|
---|
[47d5a9e5] | 169 |
|
---|
| 170 | <seglistitem>
|
---|
| 171 | <seg>
|
---|
[822c1eb5] | 172 | brotli
|
---|
[47d5a9e5] | 173 | </seg>
|
---|
| 174 | <seg>
|
---|
[748752de] | 175 | libbrotlicommon.so,
|
---|
| 176 | libbrotlidec.so, and
|
---|
| 177 | libbrotlienc.so
|
---|
[47d5a9e5] | 178 | </seg>
|
---|
| 179 | <seg>
|
---|
[cb40a58] | 180 | /usr/include/brotli and
|
---|
[ec288f7] | 181 | /usr/lib/python&python3-majorver;/site-packages/Brotli-&brotli-version;.dist-info
|
---|
[cb40a58] | 182 | (if you built and installed the Python3 bindings)
|
---|
[47d5a9e5] | 183 | </seg>
|
---|
| 184 | </seglistitem>
|
---|
| 185 | </segmentedlist>
|
---|
| 186 |
|
---|
| 187 | <variablelist>
|
---|
| 188 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 189 | <?dbfo list-presentation="list"?>
|
---|
| 190 | <?dbhtml list-presentation="table"?>
|
---|
| 191 |
|
---|
| 192 | <varlistentry id="brotli-prog">
|
---|
| 193 | <term><command>brotli</command></term>
|
---|
| 194 | <listitem>
|
---|
| 195 | <para>
|
---|
| 196 | can compress or decompress files, or test the integrity of
|
---|
[4c24eb0a] | 197 | compressed files
|
---|
[47d5a9e5] | 198 | </para>
|
---|
| 199 | <indexterm zone="brotli brotli-prog">
|
---|
| 200 | <primary sortas="b-brotli">brotli</primary>
|
---|
| 201 | </indexterm>
|
---|
| 202 | </listitem>
|
---|
| 203 | </varlistentry>
|
---|
| 204 |
|
---|
| 205 | <varlistentry id="libbrotlicommon">
|
---|
| 206 | <term><filename class="libraryfile">libbrotlicommon{-static.a,.so}</filename></term>
|
---|
| 207 | <listitem>
|
---|
| 208 | <para>
|
---|
[4c24eb0a] | 209 | is the Brotli common dictionary library
|
---|
[47d5a9e5] | 210 | </para>
|
---|
| 211 | <indexterm zone="brotli libbrotlicommon">
|
---|
| 212 | <primary sortas="c-libbrotlicommon">libbrotlicommon{,-static.a,.so}</primary>
|
---|
| 213 | </indexterm>
|
---|
| 214 | </listitem>
|
---|
| 215 | </varlistentry>
|
---|
| 216 |
|
---|
| 217 | <varlistentry id="libbrotlidec">
|
---|
| 218 | <term><filename class="libraryfile">libbrotlidec{-static.a,.so}</filename></term>
|
---|
| 219 | <listitem>
|
---|
| 220 | <para>
|
---|
[4c24eb0a] | 221 | is the Brotli decoder library
|
---|
[47d5a9e5] | 222 | </para>
|
---|
| 223 | <indexterm zone="brotli libbrotlidec">
|
---|
| 224 | <primary sortas="c-libbrotlidec">libbrotlidec{,-static.a,.so}</primary>
|
---|
| 225 | </indexterm>
|
---|
| 226 | </listitem>
|
---|
| 227 | </varlistentry>
|
---|
| 228 |
|
---|
| 229 | <varlistentry id="libbrotlienc">
|
---|
| 230 | <term><filename class="libraryfile">libbrotlienc{-static.a,.so}</filename></term>
|
---|
| 231 | <listitem>
|
---|
| 232 | <para>
|
---|
[4c24eb0a] | 233 | is the Brotli common encoder library
|
---|
[47d5a9e5] | 234 | </para>
|
---|
| 235 | <indexterm zone="brotli libbrotlienc">
|
---|
| 236 | <primary sortas="c-libbrotlienc">libbrotlienc{,-static.a,.so}</primary>
|
---|
| 237 | </indexterm>
|
---|
| 238 | </listitem>
|
---|
| 239 | </varlistentry>
|
---|
| 240 | </variablelist>
|
---|
| 241 |
|
---|
| 242 | </sect2>
|
---|
[4c24eb0a] | 243 |
|
---|
[47d5a9e5] | 244 | </sect1>
|
---|