Add lzw_decoder.set_literal_width.

This commit is contained in:
Nigel Tao committed 2017-06-11 14:02:05 +10:00
1 parent c27bec10d3
commit 019e83f190
8 files changed
+170 -31

No files matched your search

+3 -2
View File
@@ -48,7 +48,8 @@ void test_lzw_decode() {
goto cleanup0;
}
// The first byte in that file, the LZW literal width, should be 0x08.
if (src.ptr[0] != 0x08) {
uint8_t literal_width = src.ptr[0];
if (literal_width != 0x08) {
FAIL("LZW literal width: got %d, want %d", (int)(src.ptr[0]), 0x08);
goto cleanup0;
}
@@ -56,7 +57,7 @@ void test_lzw_decode() {
puffs_gif_lzw_decoder dec;
puffs_gif_lzw_decoder_constructor(&dec, PUFFS_VERSION, 0);
// TODO: call puffs_gif_lzw_decoder_set_literal_width.
puffs_gif_lzw_decoder_set_literal_width(&dec, literal_width);
puffs_gif_status status =
puffs_gif_lzw_decoder_decode(&dec, &got, &src, false);
if (status != puffs_gif_status_ok) {