Add .gz file to .zip archive without decompressing and re-compressing?
问题 Assume that the gzip file and zip archive both use DEFLATE. Since both would store the same raw compressed data for the specific file, is it possible to add a pre-compressed .gz file to an existing .zip archive? Some metadata would likely be lost (or not available), but I am more concerned with the raw file data. 回答1: Yes. I don't remember why I wrote this, but I'm sure there was a very good reason. Make sure you read the caveats in the comments. /* gz2zip.c version 1.0, 31 July 2018