Commit Graph

461 Commits

Author SHA1 Message Date
Thomas Pickert
0e3329d513 Fixed accidental plural plural wording 2015-11-10 09:52:10 -05:00
Ende
e33ff0a679 Rearranged wording to stay under 72 character limit 2015-11-10 05:32:50 -05:00
Ende
1b8b801078 Fixed two references to wrong NBLTYPESx 2015-11-07 17:55:22 -05:00
Ende
9bb41938d3 Minor: added missing word _lengths_ to insert-and-copy lengths 2015-11-06 14:14:18 -05:00
szabadka
df5bee181c Merge pull request #251 from szabadka/master
Update .txt version of the spec.
2015-11-03 17:23:45 +01:00
Zoltan Szabadka
af61a51365 Update .txt version of the spec. 2015-11-03 17:22:53 +01:00
szabadka
815731d5ff Merge pull request #250 from dsnet/draft
Suggested RFC changes
2015-11-02 20:08:03 +01:00
Joe Tsai
ce2bb01f33 Revert accidental deletion in Section 10. 2015-11-02 09:39:11 -08:00
Joe Tsai
2421ed928f Clarify pseudo-code in Section 10. 2015-11-02 03:35:39 -08:00
Joe Tsai
1a50dc9b0f fix formatting of Section 12. 2015-11-02 03:30:21 -08:00
Joe Tsai
902e81591c Fix formatting, section references, and grammar
* Add .nf and .fi tags everywhere they were missing

* Consistently use Section X.X. instead of the following:
	Paragraph X.X.
	section X

* Fix minor grammar issues
2015-11-02 03:27:27 -08:00
szabadka
1bf4f9b8e6 Merge pull request #249 from dsnet/draft
Request to change the RFC
2015-11-02 11:15:44 +01:00
Joe Tsai
3ab9853648 Fix grammar in Section 2.
s/copy length determine /copy length determines /g
2015-11-01 23:00:07 -08:00
Joe Tsai
e57dbc0f5d Minor capitalization fix 2015-11-01 18:23:20 -08:00
Joe Tsai
5c869c9de2 Clarify simple and complex prefix codes
* At the beginning of the simple prefix code section, telling us that "a value
of 1 indicates the number of leading zeros" is not very helpful. Instead, it
should indicate that it means a complex prefix code and point the reader to
the relevant section (which repeats this information in more detail)

* Clearly indicate that reusing a value is an error! This seems to be the
behavior of the of the reference implementation.

* Clarify what the termination conditions are while reading the prefix codes.
Also, indicate that it is an error if the prefix tree is over-subscribed or
under-subscribed.

* Clearly state what is the maximum number of individual symbols that may be
read. This ensures that it is forbidden to an stream that continually says that
the symbols have zero length.
2015-11-01 17:01:38 -08:00
Joe Tsai
c5b6b5c7c1 Minor formatting changes
* In the description about "three categories", explicitly number them instead
of using a giant paragraph that is harder to follow.

* Switch lists of items to consistently use American style commas. The American
style lists is better for clarity purposes. Consider the following:
	-Each category of value (insert and copy lengths, literals and distances)
	+Each category of value (insert and copy lengths, literals, and distances)

* Make sure not to break a hyphenated phrase with a newline. When the nroff
file is processed, "insert-\nand-copy" becomes "insert- and-copy", making it
inconsistent with other uses of the hyphenated phrase.

* Consistently use the same hyphenated phrase if referred to as a single unit.
	"insert and copy"   -> "insert-and-copy"
	"least significant" -> "least-significant"
	"most significant"  -> "most-significant"
	"fixed length"      -> "fixed-length"
	"block switch"      -> "block-switch".

* Consistently use "indexes" instead of "indices"
2015-11-01 16:50:13 -08:00
Joe Tsai
166edb0287 Minor formatting of Section 9.2. and Section 9.3.
Many of the fields are copy-pastes of each other, but differ slightly
in placement of words, capitalization, or other random
oddities. This commit makes it so that if you simply do a search
replace on these following passages, you get the same thing:

s/NBLTYPESX/(NBLTYPESI|NBLTYPESL|NBLTYPESD)/g
s/CATEGORY/(insert-and-copy|literal|distance)/g

>>>
   1-11 bits: NBLTYPESX, # of CATEGORY block types, encoded
              with the same variable length code as above

      Prefix code over the block type code alphabet for
         CATEGORY block types, appears only if NBLTYPESX >= 2

      Prefix code over the block count code alphabet for
         CATEGORY block counts, appears only if NBLTYPESX >= 2

      Block count code + Extra bits for first CATEGORY
         block count, appears only if NBLTYPESX >= 2
<<<

>>>
      Block type code for next CATEGORY block type, appears
         only if NBLTYPESX >= 2 and the previous CATEGORY
         block count is zero

      Block count code + extra bits for next CATEGORY
         block count, appears only if NBLTYPESX >= 2 and the
         previous CATEGORY block count is zero
<<<
2015-11-01 16:28:25 -08:00
szabadka
7e0ed88863 Merge pull request #248 from dsnet/draft
Request to change the RFC
2015-10-30 07:37:11 +01:00
Joe Tsai
542a8b776e Clarify Section 7.3
* Acknowledge the fact that the context map is conceptually really a
two-dimensional matrix with 2 different keys, but in reality stored
as a one-dimensional array.

* Mention that InverseMoveToFrontTransform will not cause the
context map to have invalid indexes. This gives someone implementing
a decoder sanity that they do not have to go through the context
map again and check that all values are less than NTREES.
2015-10-29 09:50:19 -07:00
Joe Tsai
ff3897df2d Clarify Section 8.
* The phrase "difference between these distances" can either refer to
the conceptual difference (i.e. they hae different semantic meaning)
or to the mathematical difference (i.e. use substraction for the two).
Instead, just remove the sentence since the equations below make it
clear what we're supposed to do here.
2015-10-29 09:44:23 -07:00
Joe Tsai
2ffe45bd67 Clarify Section 4.
* If NDIRECT is zero, then the paragraph reads "from 16 to 15", which
doesn't make much sense. Thus, add a conditional to avoid this minor
oddity.
2015-10-29 09:42:00 -07:00
Joe Tsai
185cb9eada Define the maximum number of bytes transforms may add to a word
* This value is useful in implementing the decoder since we can know
ahead-of-time what size buffer is needed to contain the output of a
transformed word.
2015-10-29 09:40:41 -07:00
Joe Tsai
6d2575eab3 Use consistent bit convention in Section 5.
* Rather than say "lower 3 bits" in one sentence and "bits 3-5" in
the sentence right after, just consistently use the same convention
and say "0-2" and "3-5".
2015-10-29 09:39:06 -07:00
szabadka
3985e62b82 Merge pull request #247 from dsnet/draft
Clarify Section 7.1.
2015-10-29 16:59:32 +01:00
Joe Tsai
0e4cb52a8b Clarify Section 7.1.
* Provide exhaustive list of all the ways the last two bytes can be
sourced from.

* Also make a clear connection in this section that there are only 64
context IDs for literals. This is important for the indexing math
in context maps to make sense.
2015-10-29 08:32:11 -07:00
szabadka
24469b81d6 Merge pull request #245 from szabadka/master
Fix --Wconversion and --pedantic-erros for the encoder.
2015-10-28 20:57:53 +01:00
Joe Tsai
6db33debac Merge pull request #1 from google/master
Sync with tip
2015-10-28 10:32:27 -07:00
Zoltan Szabadka
ea48ce5a6f Fix --Wconversion and --pedantic-erros for the encoder. 2015-10-28 17:44:47 +01:00
szabadka
8523d36e69 Merge pull request #242 from ende76/spec_suggest_block_switch
Added note about invalid block type value in block switch commands
2015-10-27 12:19:53 +01:00
Ende
11286539a5 Removed previous change, fixed typo NBLTYPES -> NBLTYPESL #242 2015-10-27 07:07:32 -04:00
szabadka
a48c2e23e4 Merge pull request #240 from ende76/master
Added note about invalid distance values
2015-10-27 11:43:22 +01:00
szabadka
7a14e58d73 Merge pull request #241 from rockdaboot/master
Fix a few prototypes/declarations in decoder
2015-10-27 11:40:49 +01:00
Ende
d1cd34f6d9 Moved not about invalid distances up to 0-15 section 2015-10-27 06:35:30 -04:00
Tim Rühsen
b9e413faa6 Make internal decoder functions static
Affected functions: WriteRingBuffer, CopyUncompressedBlockToOutput,
                    BrotliAllocateRingBuffer
2015-10-27 11:22:16 +01:00
Ende
e544a185f9 Added note about invalid block type value 2015-10-26 16:22:28 -04:00
Tim Rühsen
f769ba85bf Fix function prototypes 2015-10-26 21:04:12 +01:00
Ende
a05fa62501 Added note about invalid distance values 2015-10-26 16:00:20 -04:00
szabadka
10522411f1 Merge pull request #239 from szabadka/master
Use uint32_t positions in the hasher and compute distances modulo 2^32.
2015-10-26 17:26:00 +01:00
Zoltan Szabadka
a89b57b90c Use uint32_t positions in the hasher and compute distances modulo 2^32. 2015-10-26 17:08:57 +01:00
szabadka
0be6b0af54 Merge pull request #238 from szabadka/master
Generate new .txt version of the spec.
2015-10-26 12:08:08 +01:00
Zoltan Szabadka
ae04a34ce5 Generate new .txt version of the spec.
Based on the changes in the .nroff source in PR #231.
2015-10-26 12:06:29 +01:00
szabadka
816153cc79 Merge pull request #231 from dsnet/master
Use consistent bit ordering and variable names
2015-10-26 12:02:36 +01:00
szabadka
6addb5ac96 Merge pull request #237 from maxnordlund/fix-markdown-not-rendering
Fix CONTRIBUTING not rendered as markdown on GitHub
2015-10-26 10:47:14 +01:00
Joe Tsai
ec8756d79c Remove note at end of section 3.1 about switching prefix conventions 2015-10-23 15:38:45 -07:00
Max Nordlund
156038be37 Fix CONTRIBUTING not rendered as markdown on GitHub 2015-10-23 20:26:30 +02:00
szabadka
87281b127c Merge pull request #235 from szabadka/master
Add more error handling to the command-line tool.
2015-10-23 13:36:18 +02:00
Zoltan Szabadka
4f94530d7d Add more error handling to the command-line tool. 2015-10-23 12:05:43 +02:00
szabadka
9f7e4ce34f Merge pull request #233 from szabadka/master
Fix integer overflow and slowness in entropy estimation.
2015-10-23 11:54:56 +02:00
Zoltan Szabadka
d2e857d83e Fix integer overflow and slowness in entropy estimation. 2015-10-23 11:19:04 +02:00
Joe Tsai
0a9f65aadc s/static prefix code/variable length code/g 2015-10-22 09:13:59 -07:00