The ePub is quite a special zip file and you cannot just compress it. In this article we'll present the magic formulas without any special software.
zip -X0q mybook.epub mimetype; zip -Xr9D mybook.epub * -x mimetype
zip -X0q mybook.epub mimetype; zip -Xr9D mybook.epub * -x "*.DS_Store" -x mimetype
Use Windows explorer, right click, create an empty new compressed folder, drag the mimetype file into the compressed folder, drag the rest of the files into the compressed folder, change the extension .zip to .epub