<div dir="ltr">Hello, <div><br></div><div>reproducer from <a href="https://bugzilla.redhat.com/show_bug.cgi?id=2095828" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=2095828</a> is quite simple:<br></div><div>$ touch emptyFile<br>$ zip emptyFileArchive emptyFile</div><div>  adding: emptyFile (stored 0%)<br>$ file -z emptyFileArchive.zip</div><div>emptyFileArchive.zip: ERROR:[gzip: Read failed, No such file or directory] (Zip archive data, at least v1.0 to extract, compression method=store)</div><div><br></div><div>If we consider gzip flags "-cd" <a href="https://github.com/file/file/blob/master/src/compress.c#L134" target="_blank">https://github.com/file/file/blob/master/src/compress.c#L134</a></div><div>-c: Write output on standard output;</div><div>-d: Decompress;</div><div>and run:</div><div>$ gzip -cd emptyFileArchive.zip</div><div><br></div><div>gzip output is, as expected, empty, but due to this condition: <a href="https://github.com/file/file/blob/master/src/compress.c#L993" target="_blank">https://github.com/file/file/blob/master/src/compress.c#L993</a></div><div>file considers gzip output to be erroneous.</div><div><br></div><div>To achieve expected output:</div><div>$ file -z emptyFileArchive.zip</div><div>emptyFileArchive.zip: empty (Zip archive data, at least v1.0 to extract, compression method=store)<br></div><div>I propose the following patch.</div><div><br></div><div>best regards,</div><div>vincent mihalkovic</div></div>