I'm trying to understand how a JPEG file can hold 256 colours from a larger 16.7 million colour palette. I can see how indexing might help, where each pixel is defined by an index reference, but this means that an index table must be stored somewhere. This index can't be in the JPEG file itself, otherwise the file would be too big. But if the table is not in the file, then how does it know which 256 colours to use? May be I'm totally wrong.
Finally, is it true that a JPEG supports 8-bit alpha channel information?