aboutsummaryrefslogtreecommitdiff
path: root/dec
AgeCommit message (Collapse)AuthorFilesLines
2017-04-05Update c- and java-decoder: (#536)Eugene Kliuchnikov1-131/+139
* speedup java decoder * avoid masking * avoid excessive fillBits * streamline uncompressed block processing * make java decoder more transpilation-friendly * avoid non-essential goto in c-decoder
2017-03-09Fix typos (#521)Eugene Kliuchnikov2-13/+4
2017-03-06Update common, decoder, encoder, java (#520)Eugene Kliuchnikov3-3/+7
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-02-08Fix "zero-distance-code", take 2 (#506)Eugene Kliuchnikov2-2/+4
2017-02-07Fix #502 decoder bug (#505)Eugene Kliuchnikov1-0/+6
Decoder may have produced invalid output if: * at offset 0..3 dictionary word with index 3..0 for some length N is used and distance is encoded with direct distance code 0, and * at least one of next 4 commands use value from distance ringbuffer
2016-12-08Added fuzzer and updated decoder (#475)Eugene Kliuchnikov1-2/+5
* log dictionary usage * remove dead assignment * added fuzzer for https://github.com/google/oss-fuzz * added standalone test for fuzzer
2016-10-31Update docs and add more java tests (#463)Eugene Kliuchnikov6-36/+36
* 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-27enable rbit instruction for arm64 (#459)Mo DeJong1-1/+1
2016-10-20Fix `-Wcast-align` warningsEugene Kliuchnikov3-23/+25
2016-10-18Build shared libraries by defaultEugene Kliuchnikov1-16/+16
* Declare `BUILD_SHARED_LIBS` option for CMake * Define `${LIB}_SHARED_COMPILATION` when compiling shared library * Define and use BROTLI_xxx_API * Fix remaining unprefixed defines in port.h
2016-10-17Eliminate more magic constants.Eugene Kliuchnikov1-1/+1
Author: Ivan Nikulin
2016-10-17Merge pull request #424 from mdejong/masterEugene Kliuchnikov1-4/+4
check for __ARM64_ARCH_8__ in dec/port.h so that arm64 arch under cla…
2016-09-21Update encoderEugene Kliuchnikov1-1/+1
* 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-21Update decoder:Eugene Kliuchnikov6-187/+135
* use BROTLI_MAX_DISTANCE_BITS instead of magic constant * introduce BROTLI_DEPRECATED * move BROTLI_RESTRICT to common/port.h * promote reg_t to dec/port.h * remove deprecated decoder API * more optimistic ring-buffer allocation * fix MSVC warnings * fix (not tested) for ARM 64-bit RBIT
2016-08-30check for __ARM64_ARCH_8__ in dec/port.h so that arm64 arch under clang is ↵Mo DeJong1-4/+4
detected, check for __ARM_ARCH being exactly equal to 7 so that arm64 arch does not define BROTLI_TARGET_ARMV7
2016-08-23Move "public" to "include/brotli"Eugene Kliuchnikov10-10/+10
2016-08-22Remove some deadcodeSylvestre Ledru1-2/+0
2016-08-22* rename macros with preceding underscoreEugene Kliuchnikov11-214/+74
* 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-07-25Do not use "static inline" for deprecated API.Eugene Kliuchnikov2-34/+52
2016-07-25Fix DecodeContextMapEugene Kliuchnikov1-1/+1
2016-07-25Update decoder API:Eugene Kliuchnikov6-409/+488
* replace prefix Brotli -> BrotliDecoder * add HasMoreOutput * make instance pointer the first argument * use boolean instead of int
2016-06-24Update build systemsEvgenii Kliuchnikov2-21/+29
2016-06-16Update build system. Now libraries are produced as build artifacts.Eugene Kliuchnikov1-12/+0
There are currently 3 ways to build: * Easy: `./configure; make` * Simple: use Bazel * Portable: use premake5 to generate XCode / MSVS projects
2016-06-13Convert encoder to plain C.Eugene Kliuchnikov1-1/+1
2016-06-06Merge pull request #367 from google/mastereustas2-63/+62
Merge upstream changes
2016-06-06Fix "unused function" warning.Eugene Kliuchnikov2-63/+62
2016-06-03Extract common parts: constants, dictionary, etc.Eugene Kliuchnikov16-9692/+60
2016-05-31Remove "inline" specificationeustas1-1/+1
BrotliErrorString is an utility method. It is used in very specific cases -> should not be included in library. MSVC doesn't allow "inline" for C code...
2016-05-31Update decoderEugene Kliuchnikov4-83/+111
* More discreet trivial literal context detection * Make total_out parameter nullable * More strict stream validity check * Added BrotliErrorString
2016-05-20Add BROTLI_LAST_ERROR_CODE definitioneustas1-0/+2
2016-05-11Update decoder:Eugene Kliuchnikov3-161/+230
* Added BrotliGetErrorCode * fixed check of padding bits after last block
2016-04-29Update decoder:Eugene Kliuchnikov2-10/+10
* make InverseMoveToFrontTransform more standards compliant * simplify BrotliCalculateRingBufferSize
2016-04-27Limit |size| in BrotliSetCustomDictionaryEugene Kliuchnikov2-2/+6
2016-04-19Update decoder. Add encoder interface wrapper.Eugene Kliuchnikov8-93/+91
* 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
2016-03-01Use double exclamation marks in declarations of IS_CONSTANT and ↵Frédéric Wang1-4/+4
BROTLI_HAS_UBFX to force C compilers to interpret them as booleans and avoid constant-logical-operand warnings.
2016-02-18Update decoder:Eugene Kliuchnikov15-504/+271
* More clear/safe "copy" command stage implementation * Enable unaligned memory access only on whitelisted CPUs * Remove unused streams.{c|h} * Add "default" to all switches * Fix includes * Fix spacing everywhere
2016-02-04Update decode.ceustas1-3/+3
2016-02-04Fix possible pointer underfloweustas1-0/+4
2016-01-28Remove unused definitionseustas1-10/+0
2016-01-28Remove NO_ASAN annotationeustas1-1/+1
2016-01-28Make memmove16 safe.eustas1-13/+3
2016-01-22Update decoder.Eugene Kliuchnikov12-334/+187
* Reduce memory usage * Update API documentation * Remove deprecated API * Move non-API declatarions from decode.h * Remove streams * Add more debug logging * Fix shift in BrotliBitReaderUnload * Allocate ringbuffer at later stages * Sort / fix includes * Fix whitespaces * Eliminate dead code * Drive-by code simplifications
2015-12-11Fix headersEugene Klyuchnikov17-34/+17
2015-11-27Update license statement in source files.Eugene Klyuchnikov17-187/+51
2015-11-23Decoder: implement custom allocator featureEugene Klyuchnikov8-58/+140
Drive-by: conform stricter compilation flags; cleanup shared.mk
2015-11-17Add more explicit type conversions.Eugene Klyuchnikov1-0/+1
Remove dead code. Fix includes.
2015-11-07Fix implicit type conversioneustas1-1/+1
2015-11-06Brotli decoder: implement new streaming APIEugene Klyuchnikov9-934/+1622
2015-10-27Make internal decoder functions staticTim Rühsen1-7/+6
Affected functions: WriteRingBuffer, CopyUncompressedBlockToOutput, BrotliAllocateRingBuffer
2015-10-26Fix function prototypesTim Rühsen2-2/+2