MCPcopy Create free account
hub / github.com/NetHack/NetHack / Bitstream

Class Bitstream

win/share/giftiles.c:17–40  ·  view source on GitHub ↗

For use when reading the GIF as a bitstream */

Source from the content-addressed store, hash-verified

15
16/* For use when reading the GIF as a bitstream */
17struct Bitstream {
18 /* The file */
19 FILE *fp;
20
21 /* For unpacking LZW codes */
22 unsigned long bits;
23 unsigned char num_bits;
24 unsigned char bit_width;
25 unsigned char initial_bit_width;
26 unsigned char block_size;
27
28 /* The dictionary */
29 struct {
30 unsigned char byte;
31 unsigned short next;
32 } dictionary[1 << MAX_LZW_BITS];
33 unsigned short dict_size;
34
35 /* The string currently being decoded */
36 unsigned char string[1 << MAX_LZW_BITS];
37 unsigned short str_size;
38
39 unsigned short last_code;
40};
41
42struct DataBlock {
43 size_t size;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected