BinarySerializer
BinarySerializer copied to clipboard
Add new SerializeAs option for TerminatedSizedString.
This allows to keep the existing TerminatedString behaviour when a field length constraint is applied, where it essentially becomes a SizedString. Whilst also allowing new behaviour that would keep the terminated string aspect, but truncate / pad the terminated string around the length constraint
Test case shows non-standard terminator (\n or 0x0A), and non-standard padding byte 0x0D just to prove that these work as expected also.
Possibly fixes #171 (confirmation required)