Move the palette expansion into the buffer.
Merge pull request #220 from nwin/speed_up_lzw

Move the palette expansion into the buffer.