enc


Log

Author Commit Date CI Message
Eugene Kliuchnikov 9521d968 2016-10-17T17:33:12 Eliminate more magic constants. Author: Ivan Nikulin
Eugene Kliuchnikov 0a63f99d 2016-09-21T17:20:36 Update encoder * move `common/port.h` to `includes/port.h` * replace magic more magic numbers with constants * artificially limit window size to 2^18 for quality 0 and 1 * use fixed shifts for quality 0 and 1 hashes * removed `BrotliEncoderWriteMetadata` * added `BROTLI_OPERATION_EMIT_METADATA` instead * deprecated low-level API * fixed MSVC warnings
Eugene Kliuchnikov 81480011 2016-08-23T14:40:33 Move "public" to "include/brotli"
Eugene Kliuchnikov 801f5f37 2016-08-22T13:28:22 * rename macros with preceding underscore * add Brotli*TakeOutput methods * * flushing now doesn't require additional call * add Brotli*Version methods * moved public headers to 'public' directory * removed C++ API * do not assume STDC_VERSION is defined
Eugene Kliuchnikov e0af054d 2016-07-27T11:02:27 Fix ubsan warning.
Eugene Kliuchnikov 058cd1ac 2016-07-26T14:51:51 cleanup
Eugene Kliuchnikov 20481890 2016-07-26T14:41:59 Update encoder: * booleanification * integer BR scores, may improve performance if FPU is slow * condense speed-quality constants in quality.h * code massage to calm down CoverityScan * hashers refactoring * new hasher - improved speed, compression and reduced memory usage for q:5-9 w:10-16 * reduced static recources -> binary size
Evgenii Kliuchnikov 52ff8171 2016-06-24T15:32:51 Update build systems
Eugene Kliuchnikov 6a078b17 2016-06-20T17:20:17 Update encoder * reorganize premake artifacts * remove deprecated methods/struct
Eugene Kliuchnikov 378485b0 2016-06-16T10:52:57 Update build system. Now libraries are produced as build artifacts. There are currently 3 ways to build: * Easy: `./configure; make` * Simple: use Bazel * Portable: use premake5 to generate XCode / MSVS projects
Piotr Sikora 629d01cc 2016-06-15T14:25:46 Restore C++ constants in "brotli" namespace. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
eustas e208eff3 2016-06-14T13:54:11 Fix: declare variables before code
Eugene Kliuchnikov 986aa099 2016-06-14T13:42:47 Fix VS compilation warnings; cleanup API.
eustas 048b14c6 2016-06-13T16:46:25 Fix declaration / instruction mixture
eustas 999a3ce9 2016-06-13T16:44:52 Fix implicit 32->64 bit conversion
eustas 514941ad 2016-06-13T16:30:17 Fix implicit 32->64 bit conversion
eustas 7d928f47 2016-06-13T16:28:19 Fix implicit 32->64 bit conversion
eustas 3bb19efb 2016-06-13T15:54:57 Fix double constant literal
eustas d7d59462 2016-06-13T15:50:15 Backport MSVC log2 fix
eustas 918ddd31 2016-06-13T15:40:45 Fix kInfinity definition INFINITY is legal only in C++11
Eugene Kliuchnikov 3ccbf05d 2016-06-13T11:01:04 Convert encoder to plain C.
Eugene Kliuchnikov c2a9b2d2 2016-06-03T16:29:37 Step 3: change file extension C++ -> C This will break the build.
Eugene Kliuchnikov 58a3023e 2016-06-03T11:19:23 Transform most of C++ comments to C-style.
Eugene Kliuchnikov f1c9ab29 2016-06-03T10:51:04 Extract common parts: constants, dictionary, etc.
eustas e96b7db0 2016-06-14T13:54:11 Fix: declare variables before code
Eugene Kliuchnikov be1a53a6 2016-06-14T13:42:47 Fix VS compilation warnings; cleanup API.
eustas 48da49b0 2016-06-13T16:46:25 Fix declaration / instruction mixture
eustas 40101bb9 2016-06-13T16:44:52 Fix implicit 32->64 bit conversion
eustas 85712c66 2016-06-13T16:30:17 Fix implicit 32->64 bit conversion
eustas a08c36bd 2016-06-13T16:28:19 Fix implicit 32->64 bit conversion
eustas bc7f0f83 2016-06-13T15:54:57 Fix double constant literal
eustas 8d14bed2 2016-06-13T15:50:15 Backport MSVC log2 fix
eustas 18dc8eab 2016-06-13T15:40:45 Fix kInfinity definition INFINITY is legal only in C++11
Eugene Kliuchnikov b972c677 2016-06-13T11:01:04 Convert encoder to plain C.
Eugene Kliuchnikov 582ecab3 2016-06-03T16:29:37 Step 3: change file extension C++ -> C This will break the build.
Eugene Kliuchnikov 352b0b28 2016-06-03T11:19:23 Transform most of C++ comments to C-style.
Eugene Kliuchnikov 02829186 2016-06-03T10:51:04 Extract common parts: constants, dictionary, etc.
Sebastien Marchand a33fc249 2016-06-01T10:29:15 Fix
Sebastien Marchand 7fd82d46 2016-05-28T12:12:20 Fix an unitialized variable warning in encode.cc
eustas f40caec7 2016-05-18T11:13:01 Fix C -> C++
eustas 8c5ab0f3 2016-05-18T11:04:50 Make encoder API more safe Track and use "last_block_emitted" state flag
eustas 226d21c4 2016-05-18T11:01:16 Make encoder API more safe Add flag to check if "last" block has been already processed
Frank Aurich d9a268c6 2016-04-22T10:55:31 Fix compilation with VS2012
Eugene Kliuchnikov e7e38498 2016-04-19T16:29:10 Update decoder. Add encoder interface wrapper. * condense printf in port.h; use BROTLI_LOG everywhere * mark non-exported functions with BROTLI_INTERNAL * use BROTLI_DUMP instead of (void)(BROTLI_FAILURE()) * fix problems with CustomDictionary * make decode.h independent of state.h * fix "double-new-lines" * fix some strict compilation warnings * fix bro.cc compilation for MSVS * added compressor.h as a replacement for encode.h + streams.h
Piotr Sikora 501cb861 2016-03-18T19:18:59 Fix build with -Wmissing-declarations. While there, add -Wmissing-prototypes and -Wmissing-declarations to shared.mk in order to catch similar errors in the future. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Zoltan Szabadka 846575ff 2016-03-15T11:13:07 Fix TODO formatting.
Zoltan Szabadka b820c39b 2016-03-15T10:50:16 Reduce memory usage of brotli encoder at quality 10 and 11.
Eugene Kliuchnikov 25e3796f 2016-02-29T14:41:24 Fix most of ()->(void) and some missing includes.
Zoltan Szabadka dbb53e64 2016-01-27T09:50:39 Use a hash-to-binary-tree data structure for quality 11 as suggested by Issue #180.
Zoltan Szabadka 14d6ae74 2016-01-26T11:25:53 Reorder members of the Command struct plus fix some warnings. This may save 8 bytes of padding per Command (32 -> 24 bytes).
Zoltan Szabadka 82c9e197 2016-01-12T14:45:35 Relax the prerequisites of WriteBrotliData(). Instead of returning false, if it is called with no new input for a non-last block, just check if it has any already processed data to flush, and if not, return true with empty output.
Zoltan Szabadka b4c223cf 2016-01-11T12:17:44 Add missing headers.
Zoltan Szabadka 417107b3 2016-01-11T11:21:42 Add two more fast modes to the brotli compressor. The new modes process the input data in independent blocks, using backward references only from within an input block. The new modes can be used by specifying quality 0 or quality 1, the old quality 1 and quality 2 modes are renamed quality 2 and quality 3, respectively, and the old quality 3 mode is removed.
Zoltan Szabadka 1bf1b0a5 2016-01-08T10:10:22 Faster entropy coding phase for quality 1. In quality 1, use static Huffman codes for distance and command histograms with <= 128 symbols and dynamic Huffman codes with static code length codes for the other histograms.
Zoltan Szabadka 4dd9114c 2016-01-07T17:10:34 Partial Hasher initialization for small input data. This increases compression speed of very small files (< 1KB) for quality <= 3.
Zoltan Szabadka 8844b7f0 2016-01-07T16:27:49 Fix more conversion warnings.
Eugene Klyuchnikov 24ffa784 2015-12-11T11:11:51 Fix headers
eustas bc5da25a 2015-12-09T16:25:06 Merge pull request #272 from eustas/master Upgrade license to MIT.
Eugene Klyuchnikov 901cd82f 2015-12-04T16:09:40 Fix WriteMetadata (unaligned and out-of-bounds write).
Eugene Klyuchnikov 771eb107 2015-11-27T11:27:11 Update license statement in source files.
Eugene Klyuchnikov bb26d191 2015-11-23T11:05:12 Fix sign-comparison warnings + add more debug runtime checks + minor cleanup
Eugene Klyuchnikov 152e33c3 2015-11-17T13:45:41 Add more explicit type conversions. Remove dead code. Fix includes.
Zoltan Szabadka 8d061836 2015-11-12T20:13:58 Fix assertion in 32-bit build.
Zoltan Szabadka ea48ce5a 2015-10-28T17:44:47 Fix --Wconversion and --pedantic-erros for the encoder.
Zoltan Szabadka a89b57b9 2015-10-26T17:08:57 Use uint32_t positions in the hasher and compute distances modulo 2^32.
Zoltan Szabadka d2e857d8 2015-10-23T11:19:04 Fix integer overflow and slowness in entropy estimation.
Mayhem 2a1a1f72 2015-10-21T19:54:35 Remove useless BrotliCompressor instantiation in BrotliCompressBuffer
Zoltan Szabadka 512b9b8a 2015-10-11T13:03:51 Remove 'static' from kBitCostThreshold declaration.
Zoltan Szabadka 2726b8a4 2015-10-06T11:23:44 Encoder fixes. * Remove default constructors. * Initialize bit_cost in histogram.Clear(). * Check fseek result in FileSize. * Replace malloc in BrotliFileIn constructor with "new". * Catch bad_alloc in bro tool.
Cosimo Lupo 66fa4ff4 2015-10-01T16:25:21 [types.h] make std ints types for _MSC_VER compatible with CFFI As defined in _cffi_include.h: https://bitbucket.org/cffi/cffi/src/21fef94ca0c88a16b007fb495806d0371b7f878d/cffi/_cffi_include.h?at=default&fileviewer=file-view-default#_cffi_include.h-15
Zoltan Szabadka b39eec88 2015-10-05T11:43:49 Remove C++11 vector::data() calls from encoder.
Zoltan Szabadka 99aae450 2015-10-05T11:43:31 Initialize min_cost_cmd_ in constructor.
Zoltan Szabadka b6689b15 2015-10-05T11:42:45 Remove unnecessary branch from literal cost calculation.
szabadka 0477473b 2015-10-02T13:22:15 Merge pull request #184 from IIoTeP9HuY/master Support large inputs/outputs in memory adaptors
Zoltan Szabadka 754deaed 2015-10-01T17:08:59 Reduce command buffer memory usage.
Zoltan Szabadka 4c37566f 2015-10-01T15:10:42 Move literal cost computation to where it's used. Move utf8 heuristics functions to their own file.
Zoltan Szabadka 3b8bef70 2015-10-01T14:30:22 Add extern "C" linkage to the encoder and decoder dictionary definitions.
Zoltan Szabadka d4cc4f8f 2015-10-01T13:08:43 Define the encoder dictionary in the .cc file and link only once.
Zoltan Szabadka 4a7024dc 2015-10-01T12:08:14 Make the brotli encoder C++98 compatible.
Zoltan Szabadka dfdf2dd4 2015-10-01T11:40:05 Encoder bug fixes. * Fix forward declaration mismatch. * Fix division by zero in 64X test. * Avoid shadowing of variables in encoder.
acid 08e98d8d 2015-09-28T16:03:51 Support large inputs/outputs in memory adaptors
Marcin Karpinski 21ac39f7 2015-09-21T21:04:07 Fix typos.
Eugene Klyuchnikov b58317a6 2015-09-01T12:18:41 Fix bug in encoder.
Lode Vandevenne 6511d6b0 2015-08-28T16:09:23 update brotli encoder with latest improvements
Zoltan Szabadka 7de70dbc 2015-08-11T11:09:04 Add missing <stdlib.h> to streams.cc
Lode Vandevenne 17ed2589 2015-08-10T13:13:58 msan bugfixes to the brotli encoder
Zoltan Szabadka 29c26795 2015-07-30T17:42:02 Fix encoder bug. Under some circumstances CopyLiteralsToByteArray tried to read begind ringbuffer. In this patch we force it to read completely from range [0..mask]
Zoltan Szabadka 95ddb48a 2015-06-29T14:20:25 Fix some VS compilation errors in the encoder. - Use std::numeric_limits<double>::infinity() instead of 1.0 / 0.0 - Use FastLog2() instead of log2() in cost model
Lode Vandevenne bad0f4ed 2015-06-26T17:37:00 Brotli Bug Fixes
Zoltan Szabadka 618287b3 2015-06-12T16:50:49 Deprecate greedy_block_split and enable_context_modeling brotli params. These affected only quality 11, and now it does not make sense to disable block splitting or context modeling because most of the time is spent in zopfli anyway. Now all speed vs size compromises are controlled by the quality param.
Zoltan Szabadka 66098830 2015-06-12T16:45:17 Use a static hash table to look up dictionary words and transforms. This is used for quality 11, for qualities <= 9 we already have a simpler hash table. The static data size is 252 kB, and this removes the need to initialize a huge hash map at startup, which was the reason why transforms had to be disabled by default. In comparison, the static dictionary itself is 120 kB. This supports every transform, except the kOmitFirstN.
Zoltan Szabadka b3d3723f 2015-06-12T16:25:41 Add "zopfli"-style backward reference search to brotli. This commit adopts the backward reference search algorithm from the zopfli project (see https://github.com/google/zopfli) to brotli. This slower backward reference search is run only in quality 11 and it runs two iterations of entropy cost modeling and shortest path search. As a result, the original backward reference search function can be simplified a bit, since we can remove some heuristics that were replaced with the zopfli-style search.
Zoltan Szabadka 835a7746 2015-06-12T16:14:06 Change the static dictionary hash table to take into account word frequency when there are hash collisions.
Zoltan Szabadka 65f3fc55 2015-06-12T16:11:50 Bug fixes for the brotli encoder. * Fix an out-of-bounds access to depth_histo in the bit cost calculation function. * Change type of distance symbol to uint16_t in block splitter, because if all postfix bits are used, there can be 520 distance symbols. * Save the distance cache between meta-blocks at the correct place. This fixes a roundtrip failure that can occur when there is an uncompressed metablock between two compressed metablocks. * Fix a bug when setting lgwin to 24 in the encoder parameters It ended up making metablocks larger than 24 bits in size. * Fix out-of-bounds memory accesses in parallel encoder. CreateBackwardReferences can read up to 4 bytes past end of input if the end of input is before mask. * Add missing header for memcpy() in port.h
Zoltan Szabadka b43df8f6 2015-06-12T15:43:54 Brotli custom LZ77 dictionary support. Adds functions to prepend such dictionary to the encoder and decoder, and twiddles their internal parameters to do as if that was a previous part of the input. This dictionary is just a prefilled LZ77 window, it is not related to the built in transformable brotli dictionary.
Zoltan Szabadka 667f70ad 2015-06-12T15:29:06 Speedups to brotli quality 11. * Cluster at most 64 histograms at a time in the first round of clustering. * Use a faster histogram cost estimation function. * Don't compute the log2(total) multiple times in the block splitter.
Zoltan Szabadka 6622355a 2015-05-11T14:11:07 Use the same hasher for text and font mode. We use 4-byte hashing in both and look for length 3 matches separately.
Zoltan Szabadka cc8d64df 2015-05-11T13:51:47 Fix broken quality 0, make it same as quality 1.
Zoltan Szabadka aa853f3c 2015-05-11T11:33:19 Add a MODE_GENERIC compression mode to the interface. With this the users can distinguish between not knowing what the input is (ddefault) and knowing that it is text, and thus can be relied on to force some UTF-8 specific settings.
Zoltan Szabadka 54f69c9e 2015-05-07T17:44:33 Support window bits 10 - 15 in the decoder. The previous window bit value 17 is used to extend the range, since it has not been used in any previous encoders.