Oh, sorry about custom type it is just an example, I think this should be an option for any type that can have a count set to a fixed number.
If you have a definition with a fixed size.
{
"name": "foo",
"type": [
"fcstring",
{
"count": 4,
"trim": true
}
]
}
And wanted to serialize some object where it is undefined
{}
Then the buffer should zero fill.
<Buffer 00 00 00 00>
Example with buffer data type.
{
"name": "foo",
"type": [
"buffer",
{
"count": 4
}
]
}
<Buffer 00 00 00 00>
And applicable to arrays as well.
Would such an option be possible?
Maybe when setting up the serializer.
Oh, sorry about custom type it is just an example, I think this should be an option for any type that can have a count set to a fixed number.
If you have a definition with a fixed size.
And wanted to serialize some object where it is undefined
{}Then the buffer should zero fill.
<Buffer 00 00 00 00>Example with buffer data type.
<Buffer 00 00 00 00>And applicable to arrays as well.
Would such an option be possible?
Maybe when setting up the serializer.