Skip to content

Way to pre-calculate required buffer size on encode #2

@erichkeane

Description

@erichkeane

Currently, tinycbor requires that we set the buffer in advance pre-allocated. It would be nice if there was a way to pre-calculate the required size (perhaps pass a NULL buffer, have the library keep incrementing pointers as it goes through, then give a way to get that).

Additionally, it would be a nice feature to have a way AFTER we've finished allocating to determine the ACTUAL consumed size. This would permit a realloc to happen at least. Pointer-subtraction is currently possible, though a function to get this would also be nice/future proof.

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