The files of the same zip package (.zip) are inconsistent after being unzipped on different operating systems?

recently encountered a strange thing, using nodejs to write a file packaging script , the corresponding file to generate a compressed package . However, the files are inconsistent when the generated package is unzipped on the Ubuntu and Window system respectively. ? at this time my heart is almost broken
Window files under the system
clipboard.png

WindowUbuntu
clipboard.png

The script packaged by the

file is written in nodejs, and the core code is as follows

//
archive.directory(projectPath, projectName);
//node_modules
archive.directory(node_modulesVersionPath + osVersion +"/", projectName + "/node_modules/");

the environment in which scripts are executed is Window system, and under the node_modulesVersionPath + osVersion path is node_modules modules from different operating system installations .

the zip file can be confirmed to be the same.
use certutil-hashfile under window system. / linux_x64.zip MD5,
use md5sum. / linux_x64.zip,
MD5 codes are all 19a09b9fb2f0aae7fd013fc0b9da434f

in ubantu system.

files are transferred between systems through VM Tools ,
the decompression of compressed package files under ubantu system uses the extraction function of the system,
decompression of compressed package files under window system uses 360compression

compressed files are not consistent among different systems. unzipped files are transferred between different systems, and the contents remain unchanged

can this be saved?


  1. do md5, to confirm that the file is the same
  2. change the file name of test.txt and try again
  3. change the contents to all English and try again
Menu