[47d5a9e5] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 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 |
|
---|
[479979e] | 37 | &lfs120_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">
|
---|
| 82 | <xref linkend="pluggy"/> and
|
---|
| 83 | <xref linkend="pytest"/> (for testing Python3 bindings)
|
---|
| 84 | </para>
|
---|
| 85 |
|
---|
[47d5a9e5] | 86 | </sect2>
|
---|
| 87 |
|
---|
| 88 | <sect2 role="installation">
|
---|
| 89 | <title>Installation of Brotli</title>
|
---|
| 90 |
|
---|
| 91 | <para>
|
---|
| 92 | Install <application>brotli</application> by running the following
|
---|
| 93 | commands:
|
---|
| 94 | </para>
|
---|
| 95 |
|
---|
[748752de] | 96 | <screen><userinput>mkdir build &&
|
---|
| 97 | cd build &&
|
---|
[47d5a9e5] | 98 |
|
---|
| 99 | cmake -DCMAKE_INSTALL_PREFIX=/usr \
|
---|
| 100 | -DCMAKE_BUILD_TYPE=Release \
|
---|
| 101 | .. &&
|
---|
| 102 | make</userinput></screen>
|
---|
| 103 |
|
---|
| 104 | <para>
|
---|
[2754eaf] | 105 | To test the results, issue: <command>make test</command>.
|
---|
[47d5a9e5] | 106 | </para>
|
---|
| 107 |
|
---|
[1fe05eb] | 108 | <!-- These are broken
|
---|
[47d5a9e5] | 109 | <para>
|
---|
[8965351] | 110 | The python tests are missing most of the necessary testdata files and
|
---|
| 111 | therefore 240 of 311 tests fail.
|
---|
| 112 | If you nevertheless wish to test the bindings, go back to the top-level directory and
|
---|
[822c1eb5] | 113 | issue: <command>python3 setup.py test</command>.
|
---|
[47d5a9e5] | 114 | </para>
|
---|
[caee73e9] | 115 | -->
|
---|
[47d5a9e5] | 116 | <para>
|
---|
| 117 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 118 | </para>
|
---|
| 119 |
|
---|
[748752de] | 120 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 121 |
|
---|
| 122 | <para>
|
---|
| 123 | If desired, build the <application>Python3</application>
|
---|
| 124 | bindings:
|
---|
| 125 | </para>
|
---|
| 126 |
|
---|
| 127 | <screen><userinput>cd .. &&
|
---|
[4f52b38] | 128 | sed "/c\/.*\.[ch]'/d;\
|
---|
| 129 | /include_dirs=\[/\
|
---|
| 130 | i libraries=['brotlicommon','brotlidec','brotlienc']," \
|
---|
| 131 | -i setup.py &&
|
---|
[4395529] | 132 | &build-wheel-cmd; $PWD</userinput></screen>
|
---|
[47d5a9e5] | 133 |
|
---|
[caee73e9] | 134 | <para>
|
---|
[748752de] | 135 | Install the <application>Python3</application>
|
---|
[caee73e9] | 136 | bindings as the &root; user:
|
---|
| 137 | </para>
|
---|
| 138 |
|
---|
[4395529] | 139 | <screen role="root"><userinput>&install-wheel; Brotli</userinput></screen>
|
---|
[47d5a9e5] | 140 |
|
---|
[4f52b38] | 141 | <!-- "131 passed in 2.76s" for me with 1.1.0 -->
|
---|
| 142 | <para>
|
---|
| 143 | To test the <application>Python3</application> binding, issue:
|
---|
| 144 | <command>pytest</command>.
|
---|
| 145 | </para>
|
---|
| 146 | </sect2>
|
---|
| 147 |
|
---|
| 148 | <sect2 role="commands">
|
---|
| 149 | <title>Command Explanations</title>
|
---|
| 150 |
|
---|
| 151 | <!-- https://github.com/google/brotli/issues/933 -->
|
---|
| 152 | <para>
|
---|
| 153 | <command>sed ... -i setup.py</command>: Stop
|
---|
| 154 | <filename>setup.py</filename> from rebuilding the entire package all
|
---|
| 155 | over again, use the already installed libraries for the
|
---|
| 156 | <application>Python3</application> binding instead.
|
---|
| 157 | </para>
|
---|
| 158 |
|
---|
| 159 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 160 | href="../../xincludes/static-libraries.xml"/>
|
---|
| 161 |
|
---|
[47d5a9e5] | 162 | </sect2>
|
---|
| 163 |
|
---|
| 164 | <sect2 role="content">
|
---|
| 165 | <title>Contents</title>
|
---|
| 166 |
|
---|
| 167 | <segmentedlist>
|
---|
| 168 | <segtitle>Installed Programs</segtitle>
|
---|
| 169 | <segtitle>Installed Libraries</segtitle>
|
---|
[cb40a58] | 170 | <segtitle>Installed Directories</segtitle>
|
---|
[47d5a9e5] | 171 |
|
---|
| 172 | <seglistitem>
|
---|
| 173 | <seg>
|
---|
[822c1eb5] | 174 | brotli
|
---|
[47d5a9e5] | 175 | </seg>
|
---|
| 176 | <seg>
|
---|
[748752de] | 177 | libbrotlicommon.so,
|
---|
| 178 | libbrotlidec.so, and
|
---|
| 179 | libbrotlienc.so
|
---|
[47d5a9e5] | 180 | </seg>
|
---|
| 181 | <seg>
|
---|
[cb40a58] | 182 | /usr/include/brotli and
|
---|
[ec288f7] | 183 | /usr/lib/python&python3-majorver;/site-packages/Brotli-&brotli-version;.dist-info
|
---|
[cb40a58] | 184 | (if you built and installed the Python3 bindings)
|
---|
[47d5a9e5] | 185 | </seg>
|
---|
| 186 | </seglistitem>
|
---|
| 187 | </segmentedlist>
|
---|
| 188 |
|
---|
| 189 | <variablelist>
|
---|
| 190 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 191 | <?dbfo list-presentation="list"?>
|
---|
| 192 | <?dbhtml list-presentation="table"?>
|
---|
| 193 |
|
---|
| 194 | <varlistentry id="brotli-prog">
|
---|
| 195 | <term><command>brotli</command></term>
|
---|
| 196 | <listitem>
|
---|
| 197 | <para>
|
---|
| 198 | can compress or decompress files, or test the integrity of
|
---|
[4c24eb0a] | 199 | compressed files
|
---|
[47d5a9e5] | 200 | </para>
|
---|
| 201 | <indexterm zone="brotli brotli-prog">
|
---|
| 202 | <primary sortas="b-brotli">brotli</primary>
|
---|
| 203 | </indexterm>
|
---|
| 204 | </listitem>
|
---|
| 205 | </varlistentry>
|
---|
| 206 |
|
---|
| 207 | <varlistentry id="libbrotlicommon">
|
---|
| 208 | <term><filename class="libraryfile">libbrotlicommon{-static.a,.so}</filename></term>
|
---|
| 209 | <listitem>
|
---|
| 210 | <para>
|
---|
[4c24eb0a] | 211 | is the Brotli common dictionary library
|
---|
[47d5a9e5] | 212 | </para>
|
---|
| 213 | <indexterm zone="brotli libbrotlicommon">
|
---|
| 214 | <primary sortas="c-libbrotlicommon">libbrotlicommon{,-static.a,.so}</primary>
|
---|
| 215 | </indexterm>
|
---|
| 216 | </listitem>
|
---|
| 217 | </varlistentry>
|
---|
| 218 |
|
---|
| 219 | <varlistentry id="libbrotlidec">
|
---|
| 220 | <term><filename class="libraryfile">libbrotlidec{-static.a,.so}</filename></term>
|
---|
| 221 | <listitem>
|
---|
| 222 | <para>
|
---|
[4c24eb0a] | 223 | is the Brotli decoder library
|
---|
[47d5a9e5] | 224 | </para>
|
---|
| 225 | <indexterm zone="brotli libbrotlidec">
|
---|
| 226 | <primary sortas="c-libbrotlidec">libbrotlidec{,-static.a,.so}</primary>
|
---|
| 227 | </indexterm>
|
---|
| 228 | </listitem>
|
---|
| 229 | </varlistentry>
|
---|
| 230 |
|
---|
| 231 | <varlistentry id="libbrotlienc">
|
---|
| 232 | <term><filename class="libraryfile">libbrotlienc{-static.a,.so}</filename></term>
|
---|
| 233 | <listitem>
|
---|
| 234 | <para>
|
---|
[4c24eb0a] | 235 | is the Brotli common encoder library
|
---|
[47d5a9e5] | 236 | </para>
|
---|
| 237 | <indexterm zone="brotli libbrotlienc">
|
---|
| 238 | <primary sortas="c-libbrotlienc">libbrotlienc{,-static.a,.so}</primary>
|
---|
| 239 | </indexterm>
|
---|
| 240 | </listitem>
|
---|
| 241 | </varlistentry>
|
---|
| 242 | </variablelist>
|
---|
| 243 |
|
---|
| 244 | </sect2>
|
---|
[4c24eb0a] | 245 |
|
---|
[47d5a9e5] | 246 | </sect1>
|
---|