Simplest approach : take consecutive 8 boolean values, represent them as a single byte, write that byte to your file. That would save lot of space.
In the beginning of file, you can write the number of boolean values you want to write to the file; that number will help while reading the bytes from file, and converting them back into boolean values!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…