Commit Graph

16 Commits

Author SHA1 Message Date
Eugene Kliuchnikov
52ce8670eb Fix typos (#521) 2017-03-09 17:34:16 +01:00
Eugene Kliuchnikov
cdca91b6f5 Update common, decoder, encoder, java (#520)
Common:
 * wrap dictionary data into `BrotliDictionary` structure
 * replace public constant with getter `BrotliGetDictionary`
 * reformat dictionary data

Decoder:
 * adopt common changes
 * clarify acceptable instance usage patterns
 * hold reference to dictionary in state

Encoder:
 * adopt common changes
 * eliminate PIC spots in `CreateBackwardReferences`
 * add per-chunk ratio guards for q0 and q1
 * precompute relative distances to avoid repeated calculations
 * prostpone hasher allocation/initialization
 * refactor Hashers to be class-like structure
 * further improvements for 1MiB+ inputs
 * added new hasher type; made hashers more configurable

Java:
 * Pull byte->int magic to `IntReader` from `BitReader`
2017-03-06 14:22:45 +01:00
Eugene Kliuchnikov
11df843cf0 Update encoder (#504)
* pull `BROTLI_MAX_BACKWARD_LIMIT` to constants
 * split generic and Zopfli backward references code
 * pull hashers init and stitch invocation to encoder
 * make `dictionary_hash` a compilation unit
 * add `size hint` parameter
 * add new hasher
 * use `size hint` to pick new hasher for q4
 * modernize clz guard (fix #495)
 * move `hash to binary tree` to separate file
 * add `Initialize` and `Cleanup` to all hashers
 * do not raise OOM if malloc(0) == NULL (fix #500)
2017-02-06 14:20:43 +01:00
Eugene Kliuchnikov
8d3fdc1dfe Update encoder (#497)
* pad dictionary LUTs to length 32, etc. (#493)
 * avoid using INFINITY constant (#496)
 * make dictionary_hash.h more compact
 * add "disable literal context modelling" parameter
2017-01-26 11:32:18 +01:00
Eugene Kliuchnikov
7e347a7c84 Update encoder (#492)
* fix comment position in `context.h`
 * fix typo in internal quality constant name
 * deduplicate `BuildMetaBlockGreedy` code
 * simplify aggregation in `ChooseContextMap`
2016-12-22 15:55:05 +01:00
Eugene Kliuchnikov
e9b278ac6e Update docs and add more java tests (#463)
* doxygenize and update API documentation
 * fix spelling
 * add "fuzz" corpus for java decoder to improve coverage
 * use upper-case-snake names for dictionary constant definitions
 * use `LDFLAGS` in conventional `Makefile`
2016-10-31 14:33:59 +01:00
Eugene Kliuchnikov
8bcaabb0d1 Fix "take output" flush workflow. 2016-10-19 16:19:26 +02:00
Eugene Kliuchnikov
9521d968f3 Eliminate more magic constants.
Author: Ivan Nikulin
2016-10-17 17:33:12 +02:00
Eugene Kliuchnikov
0a63f99db9 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
2016-09-21 17:20:36 +02:00
Eugene Kliuchnikov
8148001158 Move "public" to "include/brotli" 2016-08-23 14:40:33 +02:00
Eugene Kliuchnikov
801f5f37ee * 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
2016-08-22 13:28:22 +02:00
Eugene Kliuchnikov
2048189048 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
2016-07-26 14:41:59 +02:00
Eugene Kliuchnikov
6a078b17d7 Update encoder
* reorganize premake artifacts
* remove deprecated methods/struct
2016-06-20 17:20:17 +02:00
Eugene Kliuchnikov
be1a53a61b Fix VS compilation warnings; cleanup API. 2016-06-14 13:42:47 +02:00
Eugene Kliuchnikov
b972c67780 Convert encoder to plain C. 2016-06-13 11:01:04 +02:00
Eugene Kliuchnikov
582ecab380 Step 3: change file extension C++ -> C
This will break the build.
2016-06-03 16:29:37 +02:00