To extract the hours/minutes/seconds from a DOS timestamp
hour = (timestamp >> 11) & 0x1f min = (timestamp >> 5) & 0x3f sec = (timestamp & 0x1f) * 2
(x >> 6) == 0b10
(uint16)r | ((uint16)g << 5) | ((uint16)b << 10)
(x >> 24) | ((x >> 8) & 0xff00) | ((x << 8) & 0xff0000) | (x << 24)
To extract the hours/minutes/seconds from a DOS timestamp
To check if a byte is a UTF-8 continuation byte To pack 5-bit r, g, b values into a 16-bit integer To swap the bytes of a uint32 (little endian <-> big endian conversion)