What is the most compressed way to "write" a chessboard as an integer considering en passant and castling as always possible no matter what.
If all the pieces are on the board, there are 64!/32!/8!^2/2^6*(32/63)*(31/61) or about 1.2*10^42 positions. This would require 140 bits. The 64!/32! puts the pieces on squares, the divisions account for permuting like pieces, and the last two fractions put the bishop pairs on opposite color squares. I would guess a dozen or so more bits would be required to cover positions with some of the pieces gone, but calculating the exact number is not so easy. Decoding a position from 140 bits can be done, but would be a pain. Clearly 8 bytes will not suffice.
The engine opening books in polyglot format store the fen in a 64 bit hash.
see http://hgm.nubati.net/book_format.html for more information
note that they leave out the information about the movenumber and the actioncounter which counts the number of moves without pawn moves or taking until the 50 move rule draw. But all the other information like castling possibilities or enpassants are included.