Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
by adding the current TLV header, which was missing in the previous commit. Also clean up the code and use extend_option() where the data is more than 255 bytes. We try to avoid splitting data across multiple options. The result is that the encoder may output multiple options of the same number, BUT where the lengths are smaller than 255. This means that any decoder can just decode the data in-place most of the time. We split data across multiple options ONLY when the encoded data is more than 255 bytes. And even then, we try to start that encoding on a new option.
- Loading branch information
Showing
1 changed file
with
31 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters