Commit Graph

1206 Commits

Author SHA1 Message Date
Zoltan Szabadka
534654def1 Add a faster but less dense compression mode.
The new mode can be used by setting the greedy_block_split
field of BrotliParams to true.

This commit moves all the meta-block processing code
into its own library and moves the meta-block encoding
code to brotli_bit_stream.cc from encode.cc
2015-03-27 14:20:35 +01:00
szabadka
169c32d887 Merge pull request #47 from szabadka/master
Change the return value of decoder functions from integer codes to an enum.
2015-03-27 13:56:35 +01:00
Zoltan Szabadka
c5ccd0dff9 Change the return value of decoder functions from integer codes to an enum. 2015-03-27 13:54:43 +01:00
lvandeve
c9cc258cdd Merge pull request #45 from lvandeve/master
Propagate error condition from ReadHuffmanCodeLengths()
2015-03-26 17:43:55 +01:00
Lode Vandevenne
85abce6c6e Propagate error condition from ReadHuffmanCodeLengths() 2015-03-26 17:40:07 +01:00
szabadka
12abfaf59b Merge pull request #44 from szabadka/master
Remove the redundant EncodeMetaBlockLength() function.
2015-03-24 10:21:10 +01:00
Zoltan Szabadka
497814eebd Remove the redundant EncodeMetaBlockHeader() function.
Use Store{Compressed,Uncompressed}MetaBlockHeader() instead.
2015-03-24 10:18:06 +01:00
szabadka
e0aa0cc450 Merge pull request #43 from anthrotype/fix_py
[python] fix calling python script as subprocess on Windows
2015-03-23 13:42:15 +01:00
Cosimo Lupo
17866801d6 [python] fix calling python script as subprocess on Windows 2015-03-23 12:09:42 +00:00
szabadka
65c6e67920 Merge pull request #42 from anthrotype/fix_py
[python] add state.c and state.h to Brotli extension's setup.py
2015-03-23 09:57:53 +01:00
Cosimo Lupo
203fe326d4 [python] fix subprocess shell pipeline 2015-03-22 00:15:54 +00:00
Cosimo Lupo
064d8e0bea [python] add new state.c and state.h to Brotli extension's setup.py 2015-03-21 20:05:02 +00:00
lvandeve
30dbb5675d Merge pull request #41 from lvandeve/master
a few more tweaks to the streaming support
2015-03-20 17:03:58 +01:00
Lode Vandevenne
b142207917 a few more tweaks to the streaming support 2015-03-20 17:03:11 +01:00
lvandeve
cb49d6a8dd Merge pull request #40 from lvandeve/master
support for partial input (streaming)
2015-03-20 16:17:33 +01:00
Lode Vandevenne
8270250b40 support for partial input (streaming) 2015-03-20 16:13:15 +01:00
lvandeve
d5c4fb4494 Merge pull request #39 from lvandeve/master
separate the licenses from documentation
2015-03-20 15:56:02 +01:00
Lode Vandevenne
81cb09f1b3 separate the licenses from documentation 2015-03-20 15:44:15 +01:00
szabadka
4836e87d4c Merge pull request #38 from anthrotype/py_tests
add Python port of bro utility and scripts to test Brotli extension
2015-03-16 20:35:19 +01:00
szabadka
e651c85fe2 Merge pull request #37 from anthrotype/setup_py
[python] setup.py fixes for Windows
2015-03-16 20:33:14 +01:00
szabadka
b5ba646b19 Merge pull request #36 from khaledhosny/python-decompress
[python] Use BrotliDecompress()
2015-03-16 20:31:18 +01:00
Khaled Hosny
e0c5df8c61 [python] Use BrotliDecompress()
So that we can use a callback to dynamically allocate the decompression
buffer, getting rid of the optional bufsize argument to
decompress.decompress().
2015-03-16 21:06:52 +02:00
Cosimo Lupo
b33e10e9dc add Python port of bro utility and scripts to test Brotli extension 2015-03-16 17:56:10 +00:00
Cosimo Lupo
3113fe7163 [setup.py] enable C++ exception handling on MSVC compiler to fix warning C4530 2015-03-16 16:55:07 +00:00
Cosimo Lupo
dec72c5931 [setup.py] use "-std=c++0x" only with GCC compiler (usupported on MSVC) 2015-03-16 16:54:59 +00:00
Cosimo Lupo
855efcf75c [python/setup.py] use relative paths instead of symlinks (unsupported on Win) 2015-03-16 16:54:27 +00:00
Dmitry Shachnev
5da7e37a06 Makefile fixes and cleanups
- Distinguish between CC/CFLAGS, CPP/CPPFLAGS and CXX/CXXFLAGS.
  Do not store compiler flags in CPPFLAGS, which is for preprocessor,
  and do not try to link files using a preprocessor.
- Use COMMON_FLAGS for flags that are for both C and C++.
- Drop -m64 flag which is wrong on 32-bit systems.
- Use $(MAKE) instead of make, so that parallel building works.
2015-03-14 14:31:44 +03:00
szabadka
ca29aa22c2 Merge pull request #34 from szabadka/master
Fix another use of log2() in literal_cost.cc
2015-02-27 16:54:15 +01:00
Zoltan Szabadka
28135ea9e8 Fix another use of log2() in literal_cost.cc 2015-02-27 16:53:00 +01:00
szabadka
1fce8b8086 Merge pull request #33 from szabadka/master
Fix encoder compilation error on MSVS 2010.
2015-02-27 16:12:54 +01:00
Zoltan Szabadka
fab601e81f Fix encoder compilation error on MSVS 2010.
As reported by @anthrotype, log2() is missing from MSVS 2010.
This patch uses log() and a multiplication in FastLog2()
for _MSV_VER <= 1600 and uses FastLog2() in literal_cost.cc
instead of log2().
2015-02-27 16:04:43 +01:00
szabadka
e60b7b846a Merge pull request #30 from szabadka/master
Implement a 32-bit bitstream decoder + visual studio support
2015-02-25 18:40:17 +01:00
Zoltan Szabadka
f0b88cbcdb Fixes to the encoder to support visual studio.
Changes suggested by @r-lyeh and @anthrotype.

 - Use a portable simple PRNG instead of rand_r()
 - add missing <assert.h> include
 - disambiguate log2() argument type
 - remove endian.h include from write_bits.h
2015-02-25 18:19:51 +01:00
Zoltan Szabadka
6da0c5c992 Implement a 32-bit bitstream decoder.
The 64-bit bitstream decoder seems to have portability problems
with emscripten/asm.js as it does not compile into working code.
2015-02-25 13:32:17 +01:00
szabadka
ff218b18b4 Merge pull request #29 from szabadka/master
Fully qualify std::max_element, std::push_heap and std::pop_heap names.
2015-02-25 10:31:52 +01:00
Zoltan Szabadka
5bc56a17ee Fully qualify std::max_element, std::push_heap and std::pop_heap names. 2015-02-25 10:29:24 +01:00
szabadka
c0d7498031 Merge pull request #28 from szabadka/master
Speed up FindMatchLength for non-x86 64-bit targets.
2015-02-25 10:27:14 +01:00
Zoltan Szabadka
e643328a7a Speed up FindMatchLength for non-x86 64-bit targets.
This CL enables 64-bit optimization for non-x86 target.
2015-02-25 10:24:13 +01:00
szabadka
c7b9821f37 Merge pull request #26 from szabadka/master
Fix a sign-conversion warning in the decoder.
2015-02-24 11:35:01 +01:00
Zoltan Szabadka
68d63f5966 Fix a sign-conversion warning in the decoder. 2015-02-24 11:22:29 +01:00
szabadka
35cd3db9c1 Merge pull request #25 from irori/sign-compare
Make decoder code warning-free
2015-02-24 10:41:41 +01:00
Kunihiko Sakamoto
65d655dad5 Compile decoder with -Wall flag
This also fixes two "comparison between signed and unsigned" warnings.
2015-02-24 17:48:26 +09:00
szabadka
cb0ca3a3c6 Merge pull request #17 from khaledhosny/master
Add Python bindings
2015-01-28 10:18:34 +01:00
Khaled Hosny
11306237f4 Add Python bindings 2015-01-24 11:56:43 +02:00
szabadka
93049d96e7 Merge pull request #23 from szabadka/master
Add more test cases.
2015-01-13 16:44:13 +01:00
Zoltan Szabadka
1d76397891 Add more test cases. 2015-01-13 16:42:35 +01:00
szabadka
7e350cd4a7 Merge pull request #21 from szabadka/master
Fix undefined behavior in decoder.
2014-11-26 12:12:20 +01:00
Zoltan Szabadka
4278934e82 Fix undefined behavior in decoder.
Use memmove() for copying overlapping buffers.
2014-11-26 10:37:33 +01:00
szabadka
50b4f4e6b3 Merge pull request #20 from szabadka/master
Remove unneeded malloc.h header.
2014-11-24 16:21:58 +01:00
Zoltan Szabadka
66f6b66c88 Remove unneeded malloc.h header. 2014-11-24 16:20:22 +01:00