Maybe `return header.ljust(header_size, "\0")`?