code: private void compressFile( InputStream in, OutputStream zOut )
          throws IOException
      {
          byte[] buffer = new byte[8 * 1024];
          int count = 0;
          do
          {
              zOut.write( buffer, 0, count );
              count = in.read( buffer, 0, buffer.length );
          }
          while ( count != -1 );
      }
docs: compress a stream to an output stream
  
  @param in
  @param zOut
  @throws IOException