function encodeFile(file) {
  const name = textEncoder.encode(file.name.replace(/\\/g, '/'));
  const comment = textEncoder.encode(file.comment);
  return {
    name,
    mode: file.mode,
    date: file.date,
    content: file.content,
    comment,
  };
}
@param {import('./types.js').ArchivedFile} file
@returns {import('./types.js').UncompressedFile}