{"id":2779,"date":"2011-02-14T18:53:45","date_gmt":"2011-02-14T13:23:45","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=2779"},"modified":"2011-02-14T18:53:45","modified_gmt":"2011-02-14T13:23:45","slug":"file-compression","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/file-compression\/","title":{"rendered":"File Compression"},"content":{"rendered":"<p>Creating a zip file using AntBuilder.<\/p>\n<blockquote>\n<pre lang=\"groovy\">\r\n        def ant = new AntBuilder()\r\n        ant.zip(\r\n                destfile: destPath,\r\n                basedir: basePath,\r\n                includes: includeFiles, \/\/ Comma seperated file names\r\n                excludes: excludeFiles, \/\/ Comma seperated file names\r\n                level: 9     \/\/ maximum compression\r\n        )\r\n\r\n <\/pre>\n<\/blockquote\nFor unzipping the file:\n\n\n<blockquote>\n<pre lang=\"groovy\">\r\n        def ant = new AntBuilder();\r\n        ant.unzip(\r\n\t\tsrc: srcPath,\r\n                dest: destDir,\r\n                overwrite: \"true\"\r\n\t)\r\n\r\n <\/pre>\n<\/blockquote>\n<p>Hope this helped!<\/p>\n<p>Cheers!<\/p>\n<p>Anshul Sharma<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Creating a zip file using AntBuilder. def ant = new AntBuilder() ant.zip( destfile: destPath, basedir: basePath, includes: includeFiles, \/\/ Comma seperated file names excludes: excludeFiles, \/\/ Comma seperated file names level: 9 \/\/ maximum compression )<\/p>\n","protected":false},"author":21,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":2},"categories":[7],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/2779"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=2779"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/2779\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=2779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=2779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=2779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}