When putting two identical files in a .zip, they take 2x space, can this be avoided

You can put the two files into an uncompressed zip file (e.g. with 7-Zip), then put the resulting file into a zip file again.