function writeFile(writer, file) {
  // Header
  const fileStart = writer.index;
  writer.write(signature.LOCAL_FILE_HEADER);
  const headerStart = writer.index;
  // Version needed to extract
  writer.writeUint16(10, true);
  writer.writeUint16(file.bitFlag, true);
  writer.writeUint16(file.compressionMethod, true);
  writeDosDateTime(writer, file.date);
  writer.writeUint32(file.crc32, true);
  writer.writeUint32(file.compressedLength, true);
  writer.writeUint32(file.uncompressedLength, true);
  writer.writeUint16(file.name.length, true);
  const headerEnd = writer.length;

  // TODO count of extra fields length
  writer.writeUint16(0, true);
  writer.write(file.name);
  // TODO write extra fields
  writer.write(file.content);

  return {
    fileStart,
    headerStart,
    headerEnd,
  };
}
@param {BufferWriter} writer
@param {FileRecord} file
@returns {LocalFileLocator}