Skip to content

Add a method to calculate the length of an SBE message #291

Closed
@RichardWarburton

Description

@RichardWarburton

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions