{"action":"created","comment":{"url":"https://api.github.com/repos/appc/acbuild/pulls/comments/42679394","id":42679394,"diff_hunk":"@@ -33,7 +34,8 @@ var (\n func init() {\n \tcmdAcbuild.AddCommand(cmdWrite)\n \n-\tcmdWrite.Flags().BoolVar(&overwrite, \"overwrite\", false, \"overwrite output ACI\")\n+\tcmdWrite.Flags().BoolVar(&overwrite, \"overwrite\", false, \"overwrite the resulting ACI\")\n+\tcmdWrite.Flags().BoolVar(&compress, \"compress\", false, \"compress the resulting ACI\")","path":"acbuild/write.go","position":14,"original_position":14,"commit_id":"ea861d42c7e559720a98ca62b99c0346e3867e0b","original_commit_id":"ea861d42c7e559720a98ca62b99c0346e3867e0b","user":{"login":"jonboulle","id":2601015,"avatar_url":"https://avatars.githubusercontent.com/u/2601015?v=3","gravatar_id":"","url":"https://api.github.com/users/jonboulle","html_url":"https://github.com/jonboulle","followers_url":"https://api.github.com/users/jonboulle/followers","following_url":"https://api.github.com/users/jonboulle/following{/other_user}","gists_url":"https://api.github.com/users/jonboulle/gists{/gist_id}","starred_url":"https://api.github.com/users/jonboulle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonboulle/subscriptions","organizations_url":"https://api.github.com/users/jonboulle/orgs","repos_url":"https://api.github.com/users/jonboulle/repos","events_url":"https://api.github.com/users/jonboulle/events{/privacy}","received_events_url":"https://api.github.com/users/jonboulle/received_events","type":"User","site_admin":false},"body":"how about `--no-compression` like actool?\r\nOtherwise I'm happy to just omit this until we have a use case - at that time it'll take five minutes to add.","created_at":"2015-10-21T20:42:06Z","updated_at":"2015-10-21T20:42:06Z","html_url":"https://github.com/appc/acbuild/pull/47#discussion_r42679394","pull_request_url":"https://api.github.com/repos/appc/acbuild/pulls/47","_links":{"self":{"href":"https://api.github.com/repos/appc/acbuild/pulls/comments/42679394"},"html":{"href":"https://github.com/appc/acbuild/pull/47#discussion_r42679394"},"pull_request":{"href":"https://api.github.com/repos/appc/acbuild/pulls/47"}}},"pull_request":{"url":"https://api.github.com/repos/appc/acbuild/pulls/47","id":48373215,"html_url":"https://github.com/appc/acbuild/pull/47","diff_url":"https://github.com/appc/acbuild/pull/47.diff","patch_url":"https://github.com/appc/acbuild/pull/47.patch","issue_url":"https://api.github.com/repos/appc/acbuild/issues/47","number":47,"state":"open","locked":false,"title":"write: Added --compress option to gzip compress the resulting image","user":{"login":"krobertson","id":1809,"avatar_url":"https://avatars.githubusercontent.com/u/1809?v=3","gravatar_id":"","url":"https://api.github.com/users/krobertson","html_url":"https://github.com/krobertson","followers_url":"https://api.github.com/users/krobertson/followers","following_url":"https://api.github.com/users/krobertson/following{/other_user}","gists_url":"https://api.github.com/users/krobertson/gists{/gist_id}","starred_url":"https://api.github.com/users/krobertson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krobertson/subscriptions","organizations_url":"https://api.github.com/users/krobertson/orgs","repos_url":"https://api.github.com/users/krobertson/repos","events_url":"https://api.github.com/users/krobertson/events{/privacy}","received_events_url":"https://api.github.com/users/krobertson/received_events","type":"User","site_admin":false},"body":"This adds a --compress option to the write command which will gzip compress the\r\nimage when writing.\r\n\r\nCurrently, it only does gzip. The ACI spec references gzip, bzip2, and xz.\r\nGo has a built in gzip writer, but only a bzip2 reader. XZ is possible, however\r\nit requires linking to libxz and then requiring it at runtime.\r\n\r\nThis changes also reorders some of the file closing within the write function.\r\nIt moves the closes from being done in line to being defered. The gzip.Writer\r\nexposes a Close function, and want to ensure the Close options are done in\r\nthe proper order, and done across all three. Since the compression is optional,\r\nit is easier with just defering the close.\r\n\r\nThe ACI may be removed on a failure, however it is fine to remove the file\r\nbefore closing, it will clean up properly.\r\n\r\n@jonboulle @dgonyeo ","created_at":"2015-10-21T19:02:07Z","updated_at":"2015-10-21T20:42:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc106f56e89dfadf62ea08a30d4512b1a3735fcb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/appc/acbuild/pulls/47/commits","review_comments_url":"https://api.github.com/repos/appc/acbuild/pulls/47/comments","review_comment_url":"https://api.github.com/repos/appc/acbuild/pulls/comments{/number}","comments_url":"https://api.github.com/repos/appc/acbuild/issues/47/comments","statuses_url":"https://api.github.com/repos/appc/acbuild/statuses/ea861d42c7e559720a98ca62b99c0346e3867e0b","head":{"label":"apcera:add-write-compression","ref":"add-write-compression","sha":"ea861d42c7e559720a98ca62b99c0346e3867e0b","user":{"login":"apcera","id":1637964,"avatar_url":"https://avatars.githubusercontent.com/u/1637964?v=3","gravatar_id":"","url":"https://api.github.com/users/apcera","html_url":"https://github.com/apcera","followers_url":"https://api.github.com/users/apcera/followers","following_url":"https://api.github.com/users/apcera/following{/other_user}","gists_url":"https://api.github.com/users/apcera/gists{/gist_id}","starred_url":"https://api.github.com/users/apcera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apcera/subscriptions","organizations_url":"https://api.github.com/users/apcera/orgs","repos_url":"https://api.github.com/users/apcera/repos","events_url":"https://api.github.com/users/apcera/events{/privacy}","received_events_url":"https://api.github.com/users/apcera/received_events","type":"Organization","site_admin":false},"repo":{"id":44551132,"name":"acbuild","full_name":"apcera/acbuild","owner":{"login":"apcera","id":1637964,"avatar_url":"https://avatars.githubusercontent.com/u/1637964?v=3","gravatar_id":"","url":"https://api.github.com/users/apcera","html_url":"https://github.com/apcera","followers_url":"https://api.github.com/users/apcera/followers","following_url":"https://api.github.com/users/apcera/following{/other_user}","gists_url":"https://api.github.com/users/apcera/gists{/gist_id}","starred_url":"https://api.github.com/users/apcera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apcera/subscriptions","organizations_url":"https://api.github.com/users/apcera/orgs","repos_url":"https://api.github.com/users/apcera/repos","events_url":"https://api.github.com/users/apcera/events{/privacy}","received_events_url":"https://api.github.com/users/apcera/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apcera/acbuild","description":"a build tool for ACIs","fork":true,"url":"https://api.github.com/repos/apcera/acbuild","forks_url":"https://api.github.com/repos/apcera/acbuild/forks","keys_url":"https://api.github.com/repos/apcera/acbuild/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apcera/acbuild/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apcera/acbuild/teams","hooks_url":"https://api.github.com/repos/apcera/acbuild/hooks","issue_events_url":"https://api.github.com/repos/apcera/acbuild/issues/events{/number}","events_url":"https://api.github.com/repos/apcera/acbuild/events","assignees_url":"https://api.github.com/repos/apcera/acbuild/assignees{/user}","branches_url":"https://api.github.com/repos/apcera/acbuild/branches{/branch}","tags_url":"https://api.github.com/repos/apcera/acbuild/tags","blobs_url":"https://api.github.com/repos/apcera/acbuild/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apcera/acbuild/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apcera/acbuild/git/refs{/sha}","trees_url":"https://api.github.com/repos/apcera/acbuild/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apcera/acbuild/statuses/{sha}","languages_url":"https://api.github.com/repos/apcera/acbuild/languages","stargazers_url":"https://api.github.com/repos/apcera/acbuild/stargazers","contributors_url":"https://api.github.com/repos/apcera/acbuild/contributors","subscribers_url":"https://api.github.com/repos/apcera/acbuild/subscribers","subscription_url":"https://api.github.com/repos/apcera/acbuild/subscription","commits_url":"https://api.github.com/repos/apcera/acbuild/commits{/sha}","git_commits_url":"https://api.github.com/repos/apcera/acbuild/git/commits{/sha}","comments_url":"https://api.github.com/repos/apcera/acbuild/comments{/number}","issue_comment_url":"https://api.github.com/repos/apcera/acbuild/issues/comments{/number}","contents_url":"https://api.github.com/repos/apcera/acbuild/contents/{+path}","compare_url":"https://api.github.com/repos/apcera/acbuild/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apcera/acbuild/merges","archive_url":"https://api.github.com/repos/apcera/acbuild/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apcera/acbuild/downloads","issues_url":"https://api.github.com/repos/apcera/acbuild/issues{/number}","pulls_url":"https://api.github.com/repos/apcera/acbuild/pulls{/number}","milestones_url":"https://api.github.com/repos/apcera/acbuild/milestones{/number}","notifications_url":"https://api.github.com/repos/apcera/acbuild/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apcera/acbuild/labels{/name}","releases_url":"https://api.github.com/repos/apcera/acbuild/releases{/id}","created_at":"2015-10-19T17:22:16Z","updated_at":"2015-10-19T17:22:17Z","pushed_at":"2015-10-21T19:01:37Z","git_url":"git://github.com/apcera/acbuild.git","ssh_url":"git@github.com:apcera/acbuild.git","clone_url":"https://github.com/apcera/acbuild.git","svn_url":"https://github.com/apcera/acbuild","homepage":"","size":5800,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"appc:master","ref":"master","sha":"b1804747f59e3975b606bbcf0682f6077f8fa157","user":{"login":"appc","id":10080092,"avatar_url":"https://avatars.githubusercontent.com/u/10080092?v=3","gravatar_id":"","url":"https://api.github.com/users/appc","html_url":"https://github.com/appc","followers_url":"https://api.github.com/users/appc/followers","following_url":"https://api.github.com/users/appc/following{/other_user}","gists_url":"https://api.github.com/users/appc/gists{/gist_id}","starred_url":"https://api.github.com/users/appc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appc/subscriptions","organizations_url":"https://api.github.com/users/appc/orgs","repos_url":"https://api.github.com/users/appc/repos","events_url":"https://api.github.com/users/appc/events{/privacy}","received_events_url":"https://api.github.com/users/appc/received_events","type":"Organization","site_admin":false},"repo":{"id":36900260,"name":"acbuild","full_name":"appc/acbuild","owner":{"login":"appc","id":10080092,"avatar_url":"https://avatars.githubusercontent.com/u/10080092?v=3","gravatar_id":"","url":"https://api.github.com/users/appc","html_url":"https://github.com/appc","followers_url":"https://api.github.com/users/appc/followers","following_url":"https://api.github.com/users/appc/following{/other_user}","gists_url":"https://api.github.com/users/appc/gists{/gist_id}","starred_url":"https://api.github.com/users/appc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appc/subscriptions","organizations_url":"https://api.github.com/users/appc/orgs","repos_url":"https://api.github.com/users/appc/repos","events_url":"https://api.github.com/users/appc/events{/privacy}","received_events_url":"https://api.github.com/users/appc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/appc/acbuild","description":"a build tool for ACIs","fork":false,"url":"https://api.github.com/repos/appc/acbuild","forks_url":"https://api.github.com/repos/appc/acbuild/forks","keys_url":"https://api.github.com/repos/appc/acbuild/keys{/key_id}","collaborators_url":"https://api.github.com/repos/appc/acbuild/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/appc/acbuild/teams","hooks_url":"https://api.github.com/repos/appc/acbuild/hooks","issue_events_url":"https://api.github.com/repos/appc/acbuild/issues/events{/number}","events_url":"https://api.github.com/repos/appc/acbuild/events","assignees_url":"https://api.github.com/repos/appc/acbuild/assignees{/user}","branches_url":"https://api.github.com/repos/appc/acbuild/branches{/branch}","tags_url":"https://api.github.com/repos/appc/acbuild/tags","blobs_url":"https://api.github.com/repos/appc/acbuild/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/appc/acbuild/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/appc/acbuild/git/refs{/sha}","trees_url":"https://api.github.com/repos/appc/acbuild/git/trees{/sha}","statuses_url":"https://api.github.com/repos/appc/acbuild/statuses/{sha}","languages_url":"https://api.github.com/repos/appc/acbuild/languages","stargazers_url":"https://api.github.com/repos/appc/acbuild/stargazers","contributors_url":"https://api.github.com/repos/appc/acbuild/contributors","subscribers_url":"https://api.github.com/repos/appc/acbuild/subscribers","subscription_url":"https://api.github.com/repos/appc/acbuild/subscription","commits_url":"https://api.github.com/repos/appc/acbuild/commits{/sha}","git_commits_url":"https://api.github.com/repos/appc/acbuild/git/commits{/sha}","comments_url":"https://api.github.com/repos/appc/acbuild/comments{/number}","issue_comment_url":"https://api.github.com/repos/appc/acbuild/issues/comments{/number}","contents_url":"https://api.github.com/repos/appc/acbuild/contents/{+path}","compare_url":"https://api.github.com/repos/appc/acbuild/compare/{base}...{head}","merges_url":"https://api.github.com/repos/appc/acbuild/merges","archive_url":"https://api.github.com/repos/appc/acbuild/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/appc/acbuild/downloads","issues_url":"https://api.github.com/repos/appc/acbuild/issues{/number}","pulls_url":"https://api.github.com/repos/appc/acbuild/pulls{/number}","milestones_url":"https://api.github.com/repos/appc/acbuild/milestones{/number}","notifications_url":"https://api.github.com/repos/appc/acbuild/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/appc/acbuild/labels{/name}","releases_url":"https://api.github.com/repos/appc/acbuild/releases{/id}","created_at":"2015-06-04T23:02:32Z","updated_at":"2015-10-16T02:12:53Z","pushed_at":"2015-10-21T20:36:59Z","git_url":"git://github.com/appc/acbuild.git","ssh_url":"git@github.com:appc/acbuild.git","clone_url":"https://github.com/appc/acbuild.git","svn_url":"https://github.com/appc/acbuild","homepage":"","size":5800,"stargazers_count":16,"watchers_count":16,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":18,"forks":11,"open_issues":18,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/appc/acbuild/pulls/47"},"html":{"href":"https://github.com/appc/acbuild/pull/47"},"issue":{"href":"https://api.github.com/repos/appc/acbuild/issues/47"},"comments":{"href":"https://api.github.com/repos/appc/acbuild/issues/47/comments"},"review_comments":{"href":"https://api.github.com/repos/appc/acbuild/pulls/47/comments"},"review_comment":{"href":"https://api.github.com/repos/appc/acbuild/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/appc/acbuild/pulls/47/commits"},"statuses":{"href":"https://api.github.com/repos/appc/acbuild/statuses/ea861d42c7e559720a98ca62b99c0346e3867e0b"}}}}