Skip to content

Commit

Permalink
README: Clarification on n_flags
Browse files Browse the repository at this point in the history
Signed-off-by: Øyvind Rønningstad <[email protected]>
  • Loading branch information
oyvindronningstad committed Jan 9, 2024
1 parent a03632d commit 55f801b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ The `elem_count` member refers to the number of encoded objects in the current l
Backups are needed for _decoding_ if there are any lists, maps, or CBOR-encoded strings (`zcbor_bstr_*_decode`) in the data.
Backups are needed for _encoding_ if there are any lists or maps *and* you are using canonical encoding (`ZCBOR_CANONICAL`), or when using the `zcbor_bstr_*_encode` functions.

`n_flags` is used when decoding maps where the order is unknown.
It allows using the `zcbor_unordered_map_search()` function to search for elements.

See the header files for more information.

```c
/** Initialize a decoding state (could include an array of backup states).
* After calling this, decode_state[0] is ready to be used with the decoding APIs. */
Expand Down

0 comments on commit 55f801b

Please sign in to comment.