Using 3 bits for piece type (including empty) and 1 bit for color makes a simple matrix enconding of the board just 8x8x4=256 bits. Add run length encoding for empty squares and it will be much smaller.
4 bits per square has room in it for RLE flags and even counts, without increasing the worst case size.
4 bits per square has room in it for RLE flags and even counts, without increasing the worst case size.