aboutsummaryrefslogtreecommitdiff
path: root/lib/mpack/mpack.h
diff options
context:
space:
mode:
authorThomasintAnker <thomasintanker1@gmail.com>2024-06-18 16:23:51 +0200
committerThomasintAnker <thomasintanker1@gmail.com>2024-06-18 16:23:51 +0200
commita55d0bed6240c54f6173b1e38e80212c02c302de (patch)
tree07c15eebc8cd84e1071a3f72d3c74475017372f3 /lib/mpack/mpack.h
parentb45b5d04daa29fcdd456233a931dcbb5b287769f (diff)
parent245fde65808ce902064ab438296f04f691d007e7 (diff)
Merge branch 'master' into wip/handover
Diffstat (limited to 'lib/mpack/mpack.h')
-rw-r--r--lib/mpack/mpack.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/mpack/mpack.h b/lib/mpack/mpack.h
new file mode 100644
index 0000000..7c0c089
--- /dev/null
+++ b/lib/mpack/mpack.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#include "src/src/mpack/mpack.h"
+
+/**
+ * \brief read remaining bytes in reader without opening a tag first
+ *
+ * \param reader pointer to mpack reader object
+ * \param p pointer to write data to
+ * \param count maximum number of bytes to read
+ *
+ * This function reads *up to* the amount of bytes specified in \p count, or
+ * less if there is less remaining data in the buffer. If \p count is equal to
+ * 0, all remaining data in the buffer is read.
+ *
+ * \return amount of bytes read
+ */
+size_t mpack_read_remaining_bytes(mpack_reader_t * reader, char * p, size_t count);
+