Write partial byte iif offset % 8 != 0.
commita67830bf2c615f3bb83e0d41941f6ae02aa6ac9f
authorMarcel Rodrigues <marcelgmr@gmail.com>
Sat, 27 Jan 2018 14:45:26 +0000 (27 12:45 -0200)
committerMarcel Rodrigues <marcelgmr@gmail.com>
Sat, 27 Jan 2018 14:45:26 +0000 (27 12:45 -0200)
tree65883bea5762ce4064976b98f770f92f80b26cba
parent48d577dfe50021fa6230f3634121440f194b8393
Write partial byte iif offset % 8 != 0.

The function end_key() flushes the  last non-empty sub-block in a block.
The length of  this sub-block depends on whether there  are bits waiting
to fill up a temporary byte. If gif->offset is a multiple of 8, then all
bits  were  already  packed  into  bytes  and  written  to  gif->buffer.
Otherwise, there are 8 - gif->offset % 8 bits that need to be written in
the buffer, adding one byte to the sub-block.
gifenc.c