vite-plugin-compression icon indicating copy to clipboard operation
vite-plugin-compression copied to clipboard

Create "binary equal" versions on Windows and Linux

Open StefanOberhumer opened this issue 2 years ago • 0 comments

Using gzip compression on some customer projects sometimes a rebuild results in a different binary result as the gzip header includes a byte representing the OS the compression was performed on. (see also RFC1952 https://www.rfc-editor.org/rfc/rfc1952.html#page-8 ) In my case - builds are done under LinuxOS and some different WindowsOS. So we get a 0x03 for Linux and 0x0A for Windows in the gzip header OS field.

An option for setting the header value of the OS in the gzip header (10th byte of the file) would be helpful!

Btw: It seems the 4 bytes of mtime (modification time) in the header are already set to 0!

StefanOberhumer avatar Jan 05 '24 18:01 StefanOberhumer