For use when reading the GIF as a bitstream */
| 15 | |
| 16 | /* For use when reading the GIF as a bitstream */ |
| 17 | struct 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 | |
| 42 | struct DataBlock { |
| 43 | size_t size; |
nothing calls this directly
no outgoing calls
no test coverage detected