Commit Graph

105 Commits

Author SHA1 Message Date
Eugene Kliuchnikov
639fdaf62d Fix "unused function" warning. 2016-06-06 11:19:09 +02:00
eustas
384c595d19 Remove "inline" specification
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-31 16:19:59 +02:00
Eugene Kliuchnikov
755b909424 Update decoder
* More discreet trivial literal context detection
 * Make total_out parameter nullable
 * More strict stream validity check
 * Added BrotliErrorString
2016-05-31 15:40:59 +02:00
eustas
f4376d0802 Add BROTLI_LAST_ERROR_CODE definition 2016-05-20 10:22:03 +02:00
Eugene Kliuchnikov
021f6fe37d Update decoder:
* Added BrotliGetErrorCode
 * fixed check of padding bits after last block
2016-05-11 15:23:07 +02:00
Eugene Kliuchnikov
043a99e07e Update decoder:
* make InverseMoveToFrontTransform more standards compliant
 * simplify BrotliCalculateRingBufferSize
2016-04-29 13:44:16 +02:00
Eugene Kliuchnikov
ab858a9f1e Limit |size| in BrotliSetCustomDictionary 2016-04-27 16:52:24 +02:00
Eugene Kliuchnikov
e7e3849835 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
2016-04-19 16:29:10 +02:00
Frédéric Wang
2fcb2321d9 Use double exclamation marks in declarations of IS_CONSTANT and BROTLI_HAS_UBFX to force C compilers to interpret them as booleans and avoid constant-logical-operand warnings. 2016-03-01 09:39:04 +01:00
Eugene Kliuchnikov
23934731f5 Update decoder:
* 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-18 15:03:44 +01:00
eustas
68f5bbda76 Update decode.c 2016-02-04 15:42:53 +01:00
eustas
37a320dd81 Fix possible pointer underflow 2016-02-04 15:35:44 +01:00
eustas
28867aa4e7 Remove unused definitions 2016-01-28 16:34:41 +01:00
eustas
ee9464e3b0 Remove NO_ASAN annotation 2016-01-28 16:32:38 +01:00
eustas
02c606d444 Make memmove16 safe. 2016-01-28 16:28:36 +01:00
Eugene Kliuchnikov
92e3023914 Update decoder.
* 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
2016-01-22 10:19:41 +01:00
Eugene Klyuchnikov
24ffa78414 Fix headers 2015-12-11 11:11:51 +01:00
Eugene Klyuchnikov
771eb10798 Update license statement in source files. 2015-11-27 11:27:11 +01:00
Eugene Klyuchnikov
b693812271 Decoder: implement custom allocator feature
Drive-by: conform stricter compilation flags; cleanup shared.mk
2015-11-23 10:21:09 +01:00
Eugene Klyuchnikov
152e33c3a0 Add more explicit type conversions.
Remove dead code.
Fix includes.
2015-11-17 13:45:41 +01:00
eustas
65b4baf0b8 Fix implicit type conversion 2015-11-07 11:52:13 +01:00
Eugene Klyuchnikov
c0ba6d6f5e Brotli decoder: implement new streaming API 2015-11-06 11:46:04 +01:00
Tim Rühsen
b9e413faa6 Make internal decoder functions static
Affected functions: WriteRingBuffer, CopyUncompressedBlockToOutput,
                    BrotliAllocateRingBuffer
2015-10-27 11:22:16 +01:00
Tim Rühsen
f769ba85bf Fix function prototypes 2015-10-26 21:04:12 +01:00
Zoltan Szabadka
47835c6089 Fix build for SPARK. 2015-10-06 11:11:42 +02:00
Cosimo Lupo
66fa4ff403 [types.h] make std ints types for _MSC_VER compatible with CFFI
As defined in _cffi_include.h: 21fef94ca0/cffi/_cffi_include.h (_cffi_include.h-15)
2015-10-05 11:32:12 +01:00
Zoltan Szabadka
bacc734997 Fix some more compiler warnings in the decoder. 2015-10-05 10:23:32 +02:00
Zoltan Szabadka
5cf07a68b2 Initialize pos and loop_counter. 2015-10-02 16:46:08 +02:00
Zoltan Szabadka
9ceff0372c Add more build parameters. 2015-10-02 16:43:47 +02:00
Zoltan Szabadka
85fede2f05 Avoid loop in GetNextKey. 2015-10-02 16:40:26 +02:00
Zoltan Szabadka
d3eb6ecb9a Add BROTLI_FREE macro, check malloc status after histogram allocations. 2015-10-02 16:19:30 +02:00
Zoltan Szabadka
3b8bef70a5 Add extern "C" linkage to the encoder and decoder dictionary definitions. 2015-10-01 14:30:22 +02:00
Zoltan Szabadka
03c4ab5967 Simplify uncompressed block decoding state machine. 2015-09-28 12:40:39 +02:00
Zoltan Szabadka
5919712922 Avoid undefined behavior from memcpy for the portable build. 2015-09-28 12:38:29 +02:00
Zoltan Szabadka
10aaa83ffe Fix a bug in ReadHuffmanCode(). 2015-09-28 12:37:35 +02:00
Zoltan Szabadka
3cd3a1066a Small speedup of command decoding. 2015-09-28 12:34:40 +02:00
Zoltan Szabadka
e44caf9835 Introduce a BROTLI_BUILD_PORTABLE macro to disable potentially dangerous optimizations. 2015-09-25 17:57:19 +02:00
Zoltan Szabadka
85301238ea Fix a bug in CopyUncompressedBlockToOutput(). 2015-09-25 17:43:54 +02:00
Zoltan Szabadka
163b59b160 Add null output callback to decoder for easier testing. 2015-09-25 12:07:07 +02:00
Zoltan Szabadka
b04f6248be Fix a bug in uncompressed block handling. 2015-09-25 12:05:39 +02:00
Zoltan Szabadka
0cf3a54422 Update brotli decoder with latest improvements. 2015-09-24 18:35:25 +02:00
Zoltan Szabadka
1216684d0b Merge remote-tracking branch 'upstream/master' 2015-09-23 12:26:07 +02:00
Zoltan Szabadka
a7cedfc26d Update brotli decoder with latest improvements. 2015-09-23 12:24:06 +02:00
Marcin Karpinski
21ac39f7c8 Fix typos. 2015-09-21 21:04:07 +02:00
Eugene Klyuchnikov
127aa48a96 Fix bug in decoder.
Minor cleanup.
2015-09-01 12:18:22 +02:00
Lode Vandevenne
db71549ac5 update brotli decoder with latest improvements 2015-08-28 15:20:24 +02:00
Zoltan Szabadka
944c3b8290 Remove non-standard <malloc.h> from decode.c
The already included <stdlib.h> is enough for the malloc/free calls.
2015-08-11 11:07:26 +02:00
Zoltan Szabadka
4b2fd00e24 Use a single lookup table for insert/copy offsets and extra bits.
Remove safe_malloc.c since all the bounds checking is done inside
decode.c now.
2015-08-10 16:39:50 +02:00
lvandeve
45c38936b7 Enable little endian support also for visual studio 2015-08-10 14:41:42 +02:00
Lode Vandevenne
fee303fd87 fix brotli decoder MSVC compilation error 2015-08-10 14:18:37 +02:00