summaryrefslogtreecommitdiff
path: root/src/lzw.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lzw.h')
-rw-r--r--src/lzw.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/lzw.h b/src/lzw.h
index a4a58fc..dd0191e 100644
--- a/src/lzw.h
+++ b/src/lzw.h
@@ -74,23 +74,21 @@ lzw_result lzw_decode_init(
const uint8_t *compressed_data,
uint32_t compressed_data_len,
uint32_t compressed_data_pos,
- uint8_t minimum_code_size,
- const uint8_t ** const stack_base_out);
+ uint8_t minimum_code_size);
/**
- * Fill the LZW stack with decompressed data
+ * Read a single LZW code and write into lzw context owned output buffer.
*
- * Ensure anything on the stack is used before calling this, as anything
- * on the stack before this call will be trampled.
+ * 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] written Returns the number of values written.
- * Use with `stack_base_out` value from previous
- * lzw_decode_init() call.
+ * \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(
- struct lzw_ctx *ctx,
- uint32_t *written);
+lzw_result lzw_decode(struct lzw_ctx *ctx,
+ const uint8_t *restrict *const restrict data,
+ uint32_t *restrict used);
#endif