Closed
Description
If you're using an API which requires you to allocate or claim a block of memory in order to write the SBE message into it then you need to know the length of the encoded message.
This can be calculated by BLOCK_LENGTH + sum(length of each variable data field + size of length field of each variable data field).
However this couples users of the API to the details of the encoding and requires them to know that the size of length fields aren't part of the BLOCK_LENGTH. Having a static requiredLength()
method would make the API easier to use.