 GIF files use LSB-first packing order.TIFF files and PDF files use MSB-first packing order.The following example illustrates the LZW algorithm in action, showing the status of the output and the dictionary at every stage, both in encoding and decoding the data.