code: protected void compress( PlexusIoResource resource, OutputStream zOut )
          throws IOException
      {
          InputStream in = Streams.bufferedInputStream( resource.getContents() );
          try
          {
              compressFile( in, zOut );
          }
          finally
          {
              IOUtil.close( in );
          }
      }
docs: compress a resource to an output stream