mirror of
https://github.com/google/brotli.git
synced 2024-11-21 19:20:09 +00:00
35e69fc7cf
* New feature: "Large Window Brotli" By setting special encoder/decoder flag it is now possible to extend LZ-window up to 30 bits; though produced stream will not be RFC7932 compliant. Added new dictionary generator - "DSH". It combines speed of "Sieve" and quality of "DM". Plus utilities to prepare train corpora (remove unique strings). Improved compression ratio: now two sub-blocks could be stitched: the last copy command could be extended to span the next sub-block. Fixed compression ineffectiveness caused by floating numbers rounding and wrong cost heuristic. Other C changes: - combined / moved `context.h` to `common` - moved transforms to `common` - unified some aspects of code formatting - added an abstraction for encoder (static) dictionary - moved default allocator/deallocator functions to `common` brotli CLI: - window size is auto-adjusted if not specified explicitly Java: - added "eager" decoding both to JNI wrapper and pure decoder - huge speed-up of `DictionaryData` initialization * Add dictionaryless compressed dictionary * Fix `sources.lst` * Fix `sources.lst` and add a note that `libtool` is also required. * Update setup.py * Fix `EagerStreamTest` * Fix BUILD file * Add missing `libdivsufsort` dependency * Fix "unused parameter" warning.
32 lines
1.4 KiB
Plaintext
Executable File
32 lines
1.4 KiB
Plaintext
Executable File
# !/bin/sh -e
|
|
|
|
REQUIRED='is required, but not installed.'
|
|
bc -v >/dev/null 2>&1 || { echo >&2 "'bc' $REQUIRED"; exit 1; }
|
|
if [ `uname -s` != "FreeBSD" ]; then
|
|
sed --version >/dev/null 2>&1 || { echo >&2 "'sed' $REQUIRED"; exit 1; }
|
|
fi
|
|
autoreconf --version >/dev/null 2>&1 || { echo >&2 "'autoconf' $REQUIRED"; exit 1; }
|
|
|
|
# If libtool is not installed -> "error: Libtool library used but 'LIBTOOL' is undefined"
|
|
|
|
mkdir m4 2>/dev/null
|
|
|
|
BROTLI_ABI_HEX=`sed -n 's/#define BROTLI_ABI_VERSION 0x//p' c/common/version.h`
|
|
BROTLI_ABI_INT=`echo "ibase=16;$BROTLI_ABI_HEX" | bc`
|
|
BROTLI_ABI_CURRENT=`expr $BROTLI_ABI_INT / 16777216`
|
|
BROTLI_ABI_REVISION=`expr $BROTLI_ABI_INT / 4096 % 4096`
|
|
BROTLI_ABI_AGE=`expr $BROTLI_ABI_INT % 4096`
|
|
BROTLI_ABI_INFO="$BROTLI_ABI_CURRENT:$BROTLI_ABI_REVISION:$BROTLI_ABI_AGE"
|
|
|
|
BROTLI_VERSION_HEX=`sed -n 's/#define BROTLI_VERSION 0x//p' c/common/version.h`
|
|
BROTLI_VERSION_INT=`echo "ibase=16;$BROTLI_VERSION_HEX" | bc`
|
|
BROTLI_VERSION_MAJOR=`expr $BROTLI_VERSION_INT / 16777216`
|
|
BROTLI_VERSION_MINOR=`expr $BROTLI_VERSION_INT / 4096 % 4096`
|
|
BROTLI_VERSION_PATCH=`expr $BROTLI_VERSION_INT % 4096`
|
|
BROTLI_VERSION="$BROTLI_VERSION_MAJOR.$BROTLI_VERSION_MINOR.$BROTLI_VERSION_PATCH"
|
|
|
|
sed -i.bak -r "s/[0-9]+:[0-9]+:[0-9]+/$BROTLI_ABI_INFO/" Makefile.am
|
|
sed -i.bak -r "s/\[[0-9]+\.[0-9]+\.[0-9]+\]/[$BROTLI_VERSION]/" configure.ac
|
|
|
|
autoreconf --install --force --symlink || exit $
|