Commit Graph

1117 Commits

Author SHA1 Message Date
szabadka
e42eaa097c Merge pull request #82 from szabadka/master
Add input and output classes for streaming compression.
2015-04-23 14:37:50 +02:00
Zoltan Szabadka
09aa9ca410 Add the streams.* files to Makefile and setup.py 2015-04-23 14:35:43 +02:00
Zoltan Szabadka
6a5303304e Add input and output classes for streaming compression. 2015-04-23 14:29:01 +02:00
szabadka
ec03509d6d Merge pull request #81 from szabadka/master
Add params to disable static dictionary and context modeling.
2015-04-23 13:55:38 +02:00
Zoltan Szabadka
89a6fb85fb Add params to disable static dictionary and context modeling.
Disable all slow features for quality <= 9 (literal cost modeling,
dictionary, context modeling, advanced block splitting).

Change vector<Command> arguments of internal functions
to Command* and size_t.
2015-04-23 13:15:42 +02:00
szabadka
0c81a1360b Merge pull request #35 from mitya57/master
Makefile fixes and cleanups
2015-04-23 12:05:39 +02:00
szabadka
2492f171c7 Merge pull request #80 from anthrotype/test_brotli_py
[python] prepend build/lib folder to PYTHONPATH before running tests
2015-04-23 10:44:35 +02:00
Cosimo Lupo
cdde52ef63 [python] refactored tests and import shared utilities from module 2015-04-22 17:54:56 +01:00
Cosimo Lupo
906f4f52ab [python] prepend build/lib folder to PYTHONPATH before running tests 2015-04-22 16:50:38 +01:00
szabadka
7fa4586079 Merge pull request #79 from szabadka/master
Add partial output support to the decoder.
2015-04-22 17:34:55 +02:00
Zoltan Szabadka
64c261113f Add partial output support to the decoder. 2015-04-22 17:33:21 +02:00
szabadka
5ded136348 Merge pull request #78 from szabadka/master
Implement some stricter format checks in the decoder.
2015-04-22 14:43:06 +02:00
Zoltan Szabadka
84a7687453 Merge remote-tracking branch 'upstream/master' 2015-04-22 14:38:26 +02:00
Zoltan Szabadka
28b1f7a6b1 Implement some stricter format checks in the decoder.
- Reject brotli streams where the number of
    nibbles is too large for the size of the
    meta-block
  - Reject brotli streams where the padding
    bits after a meta-block are not all zero
  - Reject brotli streams where the symbol
    in the simple prefix code is not in
    the symbol alphabet
2015-04-22 14:35:21 +02:00
szabadka
42b8c74d98 Merge pull request #77 from szabadka/master
Decoder support for new empty meta-block format.
2015-04-22 14:29:05 +02:00
Zoltan Szabadka
a81f2ef433 Decoder support for new empty meta-block format.
This change enforces the new 16MB limit on the
size of the meta-blocks and adds support for
empty meta-blocks with optional ignored metadata.
2015-04-22 14:25:08 +02:00
szabadka
f393bff2e3 Merge pull request #76 from szabadka/master
Support empty meta-blocks with optional ignored metadata.
2015-04-22 13:18:52 +02:00
Zoltan Szabadka
2d8b2ec12b Support empty meta-blocks with optional ignored metadata.
This is a partially backward incompatible format change,
that makes previously valid brotli streams that contain
larger than 16MB meta-blocks invalid.

The impact of this should be minimal, since the 'bro'
command-line tool does not create larger than 2MB
meta-blocks, so the only streams this change could
break are those created by a custom brotli encoder.

This commit contains only the specification update,
implementation in the decoder and encoder will
follow in later commits.
2015-04-22 12:41:57 +02:00
szabadka
d941130e59 Merge pull request #75 from szabadka/master
Change the specification to be less strict in some cases.
2015-04-22 12:27:08 +02:00
Zoltan Szabadka
5b80ef0fd1 Change the specification to be less strict in some cases.
In the following three cases we allow more choices
for the compressor, which can potentially lead to
less compressed bits.

  (1) Allow brotli streams where the block counts
      do not count down to exactly zero at the end
      of the meta-block. This makes it possible
      for compressors to sometimes choose a block
      count which can be represented with less bits
      than the exact block count.

  (2) Remove the restriction that prefix code
      descriptions with exactly one non-zero
      length symbol in the code length alphabet
      must have 1 bit depth. This is because
      bit depth 1 requires the most bits to encode.

  (3) Allow any copy length value in the last
      command where the copy part is ignored.
      This makes it possible for a compressor
      to choose a copy length which can be
      represented with the least amount of bits.

In addition to the changes above, this commit also
has a wording clarification in the overview section
where the use of the 'context ID' expression is
changed to be consistent with the rest of the
specification, i.e. that it is a function of the
last two literals or the copy length.
2015-04-22 12:08:16 +02:00
szabadka
8fe88e4bae Merge pull request #74 from szabadka/master
Use consistent sentence spacing in the specification.
2015-04-22 11:57:26 +02:00
Zoltan Szabadka
206d067c4a Use consistent sentence spacing in the specification.
All sentence spacing was changed to one space, except
in the boilerplate which must be preserved verbatim.
2015-04-22 11:55:29 +02:00
szabadka
0c1a222159 Merge pull request #73 from szabadka/master
Add Mark Adler's edits to the specification.
2015-04-22 11:44:38 +02:00
Zoltan Szabadka
e9fd1a4f20 Add Mark Adler's edits to the specification.
The specification source is changed in this commit
to exactly mirror the specification edited by Mark Adler:

https://github.com/madler/brotli/blob/master/brotli-02-edit.nroff
(version 70e53d7)
2015-04-22 11:33:38 +02:00
szabadka
7310f1b91f Merge pull request #71 from anthrotype/pypy_unbuffered
[python] fix unbuffered binary mode for I/O streams in Windows pypy
2015-04-16 14:35:55 +02:00
Cosimo Lupo
b316cb747a [python] fix unbuffered binary mode for I/O streams in Windows pypy 2015-04-16 12:41:40 +01:00
szabadka
9e53d522a3 Merge pull request #69 from szabadka/master
Spec clarifications for Section 7.
2015-04-08 16:16:22 +02:00
Zoltan Szabadka
f80ccecd0f Spec clarifications for Section 7.
Based on Mark Adler's review comments.
2015-04-08 16:15:09 +02:00
szabadka
653d9f9401 Merge pull request #68 from szabadka/master
Spec clarifications for Section 8.
2015-04-08 11:11:15 +02:00
Zoltan Szabadka
dcdc68e68b Spec clarifications for Section 8.
Based on Mark Adler's review comments.
2015-04-08 11:07:00 +02:00
szabadka
8618383b9b Merge pull request #67 from szabadka/master
Some wording changes to Section 2 of the spec.
2015-04-07 17:27:54 +02:00
Zoltan Szabadka
92b551734a Some wording changes to Section 2 of the spec. 2015-04-07 17:23:37 +02:00
szabadka
f9bb85eb92 Merge pull request #66 from szabadka/master
Add the current version of the brotli specification.
2015-04-07 17:01:20 +02:00
Zoltan Szabadka
707b78ae26 Add the current version of the brotli specification.
Add the .nroff source file and a python script to generate
the .txt version (requires the nroff command).
2015-04-07 16:58:07 +02:00
szabadka
570c295007 Merge pull request #64 from szabadka/master
Limit the max input meta-block size to 16MB.
2015-04-02 11:12:51 +02:00
Zoltan Szabadka
e377e65f11 Limit the max input meta-block size to 16MB. 2015-04-02 11:12:04 +02:00
szabadka
17025f2b3b Merge pull request #63 from szabadka/master
Proof-of-concept encoder for parallel compression.
2015-04-01 16:39:33 +02:00
Zoltan Szabadka
1428d54178 Proof-of-concept encoder for parallel compression.
Add a version of the brotli encoder that compresses
each meta-block independently, only using the
original input data from previous meta-blocks
and nothing from the compressor state.
This is a proof-of-concept to show that the
current format is flexible enough to support
parallel multi-threaded compression.
2015-04-01 16:35:52 +02:00
szabadka
f25f65ab4d Merge pull request #62 from szabadka/master
Add an input block size parameter to brotli.
2015-04-01 16:30:05 +02:00
Zoltan Szabadka
817a3edd52 Add an input block size parameter to brotli.
This will enable processing the input in smaller
chunks than the currently default 2MB for the
slow brotli, while still benefiting from the
larger sliding window.
2015-04-01 16:29:04 +02:00
szabadka
65ea6ef44f Merge pull request #61 from szabadka/master
Update the previous two bytes when decoding an uncompressed metablock.
2015-04-01 16:25:44 +02:00
Zoltan Szabadka
2a7bbfc553 Update the previous two bytes when decoding an
uncompressed metablock.
2015-04-01 16:23:18 +02:00
szabadka
28dea6a64d Merge pull request #60 from szabadka/master
Add a missing state transition to CopyUncompressedBlockToOutput().
2015-04-01 16:20:59 +02:00
Zoltan Szabadka
fac8993bef Add a missing state transition to CopyUncompressedBlockToOutput(). 2015-04-01 16:20:16 +02:00
szabadka
bdb4e33336 Merge pull request #59 from szabadka/master
Faster decoder for data with trivial context maps.
2015-04-01 16:17:25 +02:00
Zoltan Szabadka
fe6e5d1cd9 Faster decoder for data with trivial context maps.
This makes it 20% faster when decoding data with
trivial context map (where the histogram type
depends only on the block type and not the
context).
2015-04-01 16:15:39 +02:00
szabadka
872b058d27 Merge pull request #58 from szabadka/master
Add quality and lgwin to the BrotliParams.
2015-04-01 16:12:18 +02:00
Zoltan Szabadka
d6d69ec4ac Add quality and lgwin to the BrotliParams.
Remove the hard-coded constants for window size
and meta-block size.

Initialize internal storage for each metablock
separately and reserve only as much as needed
for the actual input.
2015-04-01 16:10:15 +02:00
szabadka
5e3e97e294 Merge pull request #57 from anthrotype/sdist
[python] moved setup.py to the root of repository
2015-03-31 17:40:53 +02:00
Cosimo Lupo
77c239952d [python] moved setup.py to the root of repository 2015-03-31 09:30:56 +01:00