summaryrefslogtreecommitdiff
path: root/src/lzw.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2021-04-04 22:27:52 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2021-04-05 14:51:52 +0100
commit34d6277cf14fa104de5216fe156beab37d010d94 (patch)
tree0ce2397270ca256aa42c16fbbabc2e530313b687 /src/lzw.h
parent28ee35e73ef56eefbe6992034a2b8046d343393b (diff)
downloadlibnsgif-34d6277cf14fa104de5216fe156beab37d010d94.tar.gz
libnsgif-34d6277cf14fa104de5216fe156beab37d010d94.tar.bz2
lzw: Add function for decoding multiple LZW codes at a time.
Diffstat (limited to 'src/lzw.h')
-rw-r--r--src/lzw.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lzw.h b/src/lzw.h
index dd0191e..c130c24 100644
--- a/src/lzw.h
+++ b/src/lzw.h
@@ -91,4 +91,19 @@ lzw_result lzw_decode(struct lzw_ctx *ctx,
const uint8_t *restrict *const restrict data,
uint32_t *restrict used);
+/**
+ * Read input codes until end of lzw context owned output buffer.
+ *
+ * Ensure anything in output is used before calling this, as anything
+ * on the there before this call will be trampled.
+ *
+ * \param[in] ctx LZW reading context, updated.
+ * \param[out] data Returns pointer to array of output values.
+ * \param[out] used Returns the number of values written to data.
+ * \return LZW_OK on success, or appropriate error code otherwise.
+ */
+lzw_result lzw_decode_continuous(struct lzw_ctx *ctx,
+ const uint8_t ** const data,
+ uint32_t *used);
+
#endif