summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2021-04-24 16:14:01 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2021-04-24 16:14:01 +0100
commit7253a5b36f0f07757b99895572ceac0c95022a4e (patch)
treea706f4de2ff2b89a67c31bf9557c6eb0fee00943
parent1e61fac24f2adcd0c716c2946f7ab1998ab17adf (diff)
downloadlibnsgif-7253a5b36f0f07757b99895572ceac0c95022a4e.tar.gz
libnsgif-7253a5b36f0f07757b99895572ceac0c95022a4e.tar.bz2
lzw: Remove unused one-code-at-a-time API.
-rw-r--r--src/lzw.c13
-rw-r--r--src/lzw.h17
2 files changed, 2 insertions, 28 deletions
diff --git a/src/lzw.c b/src/lzw.c
index 3a4bd7b..c865b8d 100644
--- a/src/lzw.c
+++ b/src/lzw.c
@@ -463,19 +463,8 @@ static inline uint32_t lzw__write_pixels(struct lzw_ctx *ctx,
}
/* Exported function, documented in lzw.h */
-lzw_result lzw_decode(struct lzw_ctx *ctx,
- const uint8_t *restrict* const restrict data,
- uint32_t *restrict used)
-{
- *used = 0;
- *data = ctx->stack_base;
- return lzw__decode(ctx, ctx->stack_base, sizeof(ctx->stack_base),
- lzw__write_pixels, used);
-}
-
-/* Exported function, documented in lzw.h */
lzw_result lzw_decode_continuous(struct lzw_ctx *ctx,
- const uint8_t ** const data,
+ const uint8_t *restrict *const restrict data,
uint32_t *restrict used)
{
*used = 0;
diff --git a/src/lzw.h b/src/lzw.h
index c442cff..a227163 100644
--- a/src/lzw.h
+++ b/src/lzw.h
@@ -77,21 +77,6 @@ lzw_result lzw_decode_init(
uint8_t minimum_code_size);
/**
- * Read a single LZW code and write into 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(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
@@ -103,7 +88,7 @@ lzw_result lzw_decode(struct lzw_ctx *ctx,
* \return LZW_OK on success, or appropriate error code otherwise.
*/
lzw_result lzw_decode_continuous(struct lzw_ctx *ctx,
- const uint8_t ** const data,
+ const uint8_t *restrict *const restrict data,
uint32_t *restrict used);
/**