BinarySerializer icon indicating copy to clipboard operation
BinarySerializer copied to clipboard

Add new SerializeAs option for TerminatedSizedString.

Open bevanweiss opened this issue 1 year ago • 5 comments

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)

bevanweiss avatar May 20 '23 15:05 bevanweiss