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
e0af054d9e
Fix ubsan warning.
2016-07-27 11:02:27 +02:00
Eugene Kliuchnikov
058cd1ac7a
cleanup
2016-07-26 14:51:51 +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
Evgenii Kliuchnikov
52ff81717b
Update build systems
2016-06-24 15:32:51 +02:00
Eugene Kliuchnikov
6a078b17d7
Update encoder
...
* reorganize premake artifacts
* remove deprecated methods/struct
2016-06-20 17:20:17 +02:00
Eugene Kliuchnikov
378485b097
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
2016-06-16 10:52:57 +02:00
Piotr Sikora
629d01cc7e
Restore C++ constants in "brotli" namespace.
...
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
2016-06-15 14:25:46 -07:00
eustas
e96b7db0c2
Fix: declare variables before code
2016-06-14 13:54:11 +02:00
Eugene Kliuchnikov
be1a53a61b
Fix VS compilation warnings; cleanup API.
2016-06-14 13:42:47 +02:00
eustas
48da49b097
Fix declaration / instruction mixture
2016-06-13 16:46:25 +02:00
eustas
40101bb9bf
Fix implicit 32->64 bit conversion
2016-06-13 16:44:52 +02:00
eustas
85712c66d4
Fix implicit 32->64 bit conversion
2016-06-13 16:30:17 +02:00
eustas
a08c36bd86
Fix implicit 32->64 bit conversion
2016-06-13 16:28:19 +02:00
eustas
bc7f0f831d
Fix double constant literal
2016-06-13 15:54:57 +02:00
eustas
8d14bed24a
Backport MSVC log2 fix
2016-06-13 15:50:15 +02:00
eustas
18dc8eabe1
Fix kInfinity definition
...
INFINITY is legal only in C++11
2016-06-13 15:40:45 +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
Eugene Kliuchnikov
352b0b2836
Transform most of C++ comments to C-style.
2016-06-03 11:19:23 +02:00
Eugene Kliuchnikov
028291865d
Extract common parts: constants, dictionary, etc.
2016-06-03 10:51:04 +02:00
Sebastien Marchand
a33fc249ab
Fix
2016-06-01 10:29:15 -04:00
Sebastien Marchand
7fd82d4605
Fix an unitialized variable warning in encode.cc
2016-05-28 12:12:20 -04:00
eustas
f40caec7d1
Fix C -> C++
2016-05-18 11:13:01 +02:00
eustas
8c5ab0f342
Make encoder API more safe
...
Track and use "last_block_emitted" state flag
2016-05-18 11:04:50 +02:00
eustas
226d21c403
Make encoder API more safe
...
Add flag to check if "last" block has been already processed
2016-05-18 11:01:16 +02:00
Frank Aurich
d9a268c60c
Fix compilation with VS2012
2016-04-22 10:55:31 +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
Piotr Sikora
501cb86172
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>
2016-03-18 19:18:59 -07:00
Zoltan Szabadka
846575ff6c
Fix TODO formatting.
2016-03-15 11:13:07 +01:00
Zoltan Szabadka
b820c39bd9
Reduce memory usage of brotli encoder at quality 10 and 11.
2016-03-15 10:50:16 +01:00
Eugene Kliuchnikov
25e3796f83
Fix most of ()->(void) and some missing includes.
2016-02-29 14:41:24 +01:00
Zoltan Szabadka
dbb53e6434
Use a hash-to-binary-tree data structure for quality 11 as suggested by Issue #180 .
2016-01-27 09:50:39 +01:00
Zoltan Szabadka
14d6ae74a9
Reorder members of the Command struct plus fix some warnings.
...
This may save 8 bytes of padding per Command (32 -> 24 bytes).
2016-01-26 11:25:53 +01:00
Zoltan Szabadka
82c9e1972d
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.
2016-01-12 14:45:35 +01:00
Zoltan Szabadka
b4c223cf27
Add missing headers.
2016-01-11 12:17:44 +01:00
Zoltan Szabadka
417107b3dd
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.
2016-01-11 11:21:42 +01:00
Zoltan Szabadka
1bf1b0a598
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.
2016-01-08 10:10:22 +01:00
Zoltan Szabadka
4dd9114c97
Partial Hasher initialization for small input data.
...
This increases compression speed of very small files (< 1KB) for quality <= 3.
2016-01-07 17:10:34 +01:00
Zoltan Szabadka
8844b7f0d7
Fix more conversion warnings.
2016-01-07 16:27:49 +01:00
Eugene Klyuchnikov
24ffa78414
Fix headers
2015-12-11 11:11:51 +01:00
eustas
bc5da25a43
Merge pull request #272 from eustas/master
...
Upgrade license to MIT.
2015-12-09 16:25:06 +01:00
Eugene Klyuchnikov
901cd82f4f
Fix WriteMetadata (unaligned and out-of-bounds write).
2015-12-04 16:09:40 +01:00
Eugene Klyuchnikov
771eb10798
Update license statement in source files.
2015-11-27 11:27:11 +01:00
Eugene Klyuchnikov
bb26d1919f
Fix sign-comparison warnings
...
+ add more debug runtime checks
+ minor cleanup
2015-11-23 11:05:12 +01:00
Eugene Klyuchnikov
152e33c3a0
Add more explicit type conversions.
...
Remove dead code.
Fix includes.
2015-11-17 13:45:41 +01:00
Zoltan Szabadka
8d061836ac
Fix assertion in 32-bit build.
2015-11-12 20:13:58 +01:00
Zoltan Szabadka
ea48ce5a6f
Fix --Wconversion and --pedantic-erros for the encoder.
2015-10-28 17:44:47 +01:00