Skip to content

Example of usage, pls #13

Description

@mgierw

Hi,
I would like to use your library, but I have no idea how to write even a simple example. Could you provide such an example, please?

I wrote some lines of code:

int val = 13;
wandder_encoder_t *enc = init_wandder_encoder();
wandder_encode_next(enc, WANDDER_TAG_INTEGER, WANDDER_CLASS_UNIVERSAL_PRIMITIVE, 1, &val, sizeof(val));
auto result = wandder_encode_finish(enc);
free_wandder_encoder(enc);

but the result is the following:

Encode error: not enough space for value
a.out: src/encoder.c:739: encode_pending: Assertion `0' failed.
Aborted (core dumped)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions