code: def write_record(self, event_str):
          
          header = struct.pack('Q', len(event_str))
          header += struct.pack('I', masked_crc32c(header))
          footer = struct.pack('I', masked_crc32c(event_str))
          self._writer.write(header + event_str + footer)
docs: Writes a serialized event to file.