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:
Joe Tsai
2015-10-28 17:09:11 -07:00
parent 466f356a5c
commit 1a4f884b23

View File

@@ -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
-- ------ --------- ------