A GIF whose LZW minimum code size is exactly 8, isn't interlaced, and whose frame covers the full logical canvas embeds the same LZW codes its own encoder produced as a PDF /LZWDecode stream (re-packed into PDF's bit order) - no LZW decompress/recompress round trip.