mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
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.
This commit is contained in:
@@ -5703,6 +5703,11 @@ sequences that represent the 121 transforms are then concatenated to a single
|
||||
sequence of bytes. The length of that sequence is 648 bytes, and the zlib CRC
|
||||
is 0x3d965f81.
|
||||
|
||||
The maximum number of additional bytes that a transform may add to a base word
|
||||
is 13 bytes, based on the prefix and suffix values found in transform ID 73.
|
||||
Since the largest base word is 24 bytes in length, a buffer of (24 + 13) bytes
|
||||
is sufficient to store any transformed words (not counting a terminating zero).
|
||||
|
||||
.nf
|
||||
ID Prefix Transform Suffix
|
||||
-- ------ --------- ------
|
||||
|
||||
Reference in New Issue
Block a user