First 4 bytes: number of records as a long integer
Each record thereafter occupies 25 bytes, as follows.
Hipparcos catalogue number: 4 bytes, long integer
HD catalogue number: 4 bytes, long integer (value -1 if no HD number)
Right ascension (hours): 4 bytes, floating point
Declination (degrees): 4 bytes, floating point
Parallax (milliarcseconds): 4 bytes, floating point
Apparent magnitude*256: 2 bytes, short integer
Spectral & Luminosity classes: 2 bytes, coded as four nybbles (see below)
Parallax error (?): 1 byte, not at present used by Celestia
The nybbles are coded as follows:
Nybble 1 (star type)
0: Main sequence / giant / supergiant
1: White dwarf
2: Neutron star
3: Black hole
Nybble 2 (spectral class)
0: O
1: B
2: A
3: F
4: G
5: K
6: M
7: R
8: S
9: N
10: WC
11: WN
Nybble 3 (spectral subclass)
0-9
Nybble 4 (luminosity class)
0: Ia-0
1: Ia
2: 1b
3: II
4: III
5: IV
6: V
7: VI
Chris has recently added support for spectral classes L and T to Celestia, but I don't know if that has also been added to the code that interprets stars.dat.
The nybble info above comes from T Guilpain's Celestia page at
http://members.fortunecity.com/guilpain/index_uk.htm, the link to "Stars.dat". Several things on that page seem like they're mistaken to me (although it might just be my French letting me down) but I can confirm that much of the nybble data above are correct - although I haven't run into any neutron stars, black holes or the more exotic spectral classes.
When read as a string into Windows, Guilpain's nybbles 1 & 2 appear
after nybbles 3 & 4 - it'll be a big-endian/little-endian thing, no doubt

.
Grant