[PR #75] Change the specification to be less strict in some cases. #672

Open
opened 2026-01-29 20:50:17 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/google/brotli/pull/75

State: closed
Merged: Yes


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.

**Original Pull Request:** https://github.com/google/brotli/pull/75 **State:** closed **Merged:** Yes --- 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.
claunia added the pull-request label 2026-01-29 20:50:17 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#672