how to get compressed size of a ZipEntry while creating zip file. I need to create a zip file for an array files based on some specific size for the zip file. If the zip file exceeds that limit then i have to break the zip files into multiple zip files. Now to implement this i need to check compressed size of each ZipEntry while creating zip files, but I am always getting -1 instead of compressed size(using ZipEntry getCompressedSize()). Should I make a own getCompressedSize method or should I use OutputStream. Any help is appreated, thanks