Don't forget to track if the rooks or kings have moved, for castling eligibility. And what the previous move was for en passant. And the full game history back to the most recent capture for draw by repetition.
And the full game history back to the most recent capture for draw by repetition.
Ouch, I will leave this as an exercise to reader1. store the oldest full board you care about
2. for each turn, record either:
2A. two 6-bit coordinates
2B. 1-8 bits to say which move they picked out of the full list of legal options
Then you can use a variable length encoding (Huffman coding?) to encode the moves, with more obvious moves taking fewer bits. You could even encode multiple moves into a single code point, and it might be possible to encode an entire sequence of obvious moves (like a complex exchange) into a single code point, which might be encoded as just a single bit.