Un ejemplo breve con ZipInputStream es:
-----------------
public ProcesoRecuperacion(ZipInputStream zipInputStream) throws IOException
{
byte[] bytes = readBytes(zipInputStream);
}
byte[] bytes = readBytes(zipInputStream);
private byte[] readBytes(InputStream inputStream) throws IOException {
byte[] bytes = null;
byte[] buffer = new byte[4096];
int bytesRead = 0;
while ( (bytesRead = inputStream.read(buffer)) != -1) {
if (bytes!=null) {
byte[] oldBytes = bytes;
bytes = new byte[oldBytes.length+bytesRead];
System.arraycopy(oldBytes, 0, bytes, 0, oldBytes.length);
System.arraycopy(buffer, 0, bytes, oldBytes.length, bytesRead);
} else {
bytes = new byte[bytesRead];
System.arraycopy(buffer, 0, bytes, 0, bytesRead);
}
}
return bytes;
}
Pero para que sepas más a fondo ve a esta URL:
http://java.sun.com/developer/techni...g/compression/
Un saludo.