An append-only log is a file to which records are only ever added at the end. To replay a log of changes is to apply its records in order to an empty state. To compact it is to replace it by a shorter log whose replay gives the same state.
SET a 1, byte by byte: four bytes of length, four of CRC, then the command as it is printed. A record is 8 bytes longer than its command.