{"action":"created","comment":{"url":"https://api.github.com/repos/c-fs/cfs/pulls/comments/28625446","id":28625446,"diff_hunk":"@@ -0,0 +1,78 @@\n+package disk\n+\n+import (\n+\t\"encoding/binary\"\n+\t\"hash\"\n+\t\"hash/crc32\"\n+\t\"io\"\n+)\n+\n+var (\n+\tcrcTable = crc32.MakeTable(crc32.Castagnoli)\n+)\n+\n+type blockEncoder struct {\n+\t// block size in bytes\n+\t// payload size = block size - 4\n+\tsize int64\n+\tw    io.Writer\n+\t// optimization: global buf pool\n+\tbuf    []byte // buf for payload\n+\th      hash.Hash32\n+}\n+\n+func NewBlockEncoder(blockSize int64, w io.Writer) *blockEncoder {","path":"disk/block.go","position":24,"original_position":24,"commit_id":"1861ffda4193be36fb8a505e6fd55e64d16f1753","original_commit_id":"1861ffda4193be36fb8a505e6fd55e64d16f1753","user":{"login":"yutongp","id":915849,"avatar_url":"https://avatars.githubusercontent.com/u/915849?v=3","gravatar_id":"","url":"https://api.github.com/users/yutongp","html_url":"https://github.com/yutongp","followers_url":"https://api.github.com/users/yutongp/followers","following_url":"https://api.github.com/users/yutongp/following{/other_user}","gists_url":"https://api.github.com/users/yutongp/gists{/gist_id}","starred_url":"https://api.github.com/users/yutongp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yutongp/subscriptions","organizations_url":"https://api.github.com/users/yutongp/orgs","repos_url":"https://api.github.com/users/yutongp/repos","events_url":"https://api.github.com/users/yutongp/events{/privacy}","received_events_url":"https://api.github.com/users/yutongp/received_events","type":"User","site_admin":false},"body":"is blockEncoder a exported type or not?\r\nIf not, why NewBlockEncoder is a exported function?","created_at":"2015-04-17T20:00:31Z","updated_at":"2015-04-17T20:00:31Z","html_url":"https://github.com/c-fs/cfs/pull/2#discussion_r28625446","pull_request_url":"https://api.github.com/repos/c-fs/cfs/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/c-fs/cfs/pulls/comments/28625446"},"html":{"href":"https://github.com/c-fs/cfs/pull/2#discussion_r28625446"},"pull_request":{"href":"https://api.github.com/repos/c-fs/cfs/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/c-fs/cfs/pulls/2","id":33323812,"html_url":"https://github.com/c-fs/cfs/pull/2","diff_url":"https://github.com/c-fs/cfs/pull/2.diff","patch_url":"https://github.com/c-fs/cfs/pull/2.patch","issue_url":"https://api.github.com/repos/c-fs/cfs/issues/2","number":2,"state":"open","locked":false,"title":"benchmarking block encoder","user":{"login":"yunxing","id":1017689,"avatar_url":"https://avatars.githubusercontent.com/u/1017689?v=3","gravatar_id":"","url":"https://api.github.com/users/yunxing","html_url":"https://github.com/yunxing","followers_url":"https://api.github.com/users/yunxing/followers","following_url":"https://api.github.com/users/yunxing/following{/other_user}","gists_url":"https://api.github.com/users/yunxing/gists{/gist_id}","starred_url":"https://api.github.com/users/yunxing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yunxing/subscriptions","organizations_url":"https://api.github.com/users/yunxing/orgs","repos_url":"https://api.github.com/users/yunxing/repos","events_url":"https://api.github.com/users/yunxing/events{/privacy}","received_events_url":"https://api.github.com/users/yunxing/received_events","type":"User","site_admin":false},"body":"enchmarkCRCEncoding\t2000000000\t         0.26 ns/op\t3827.48 MB/s\r\nok  \tgithub.com/cfs/disk\t64.053s","created_at":"2015-04-15T05:30:52Z","updated_at":"2015-04-17T20:00:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7d4cfe675d73f1bb95162ca4ee42306672db5786","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/c-fs/cfs/pulls/2/commits","review_comments_url":"https://api.github.com/repos/c-fs/cfs/pulls/2/comments","review_comment_url":"https://api.github.com/repos/c-fs/cfs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/c-fs/cfs/issues/2/comments","statuses_url":"https://api.github.com/repos/c-fs/cfs/statuses/1861ffda4193be36fb8a505e6fd55e64d16f1753","head":{"label":"yunxing:master","ref":"master","sha":"1861ffda4193be36fb8a505e6fd55e64d16f1753","user":{"login":"yunxing","id":1017689,"avatar_url":"https://avatars.githubusercontent.com/u/1017689?v=3","gravatar_id":"","url":"https://api.github.com/users/yunxing","html_url":"https://github.com/yunxing","followers_url":"https://api.github.com/users/yunxing/followers","following_url":"https://api.github.com/users/yunxing/following{/other_user}","gists_url":"https://api.github.com/users/yunxing/gists{/gist_id}","starred_url":"https://api.github.com/users/yunxing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yunxing/subscriptions","organizations_url":"https://api.github.com/users/yunxing/orgs","repos_url":"https://api.github.com/users/yunxing/repos","events_url":"https://api.github.com/users/yunxing/events{/privacy}","received_events_url":"https://api.github.com/users/yunxing/received_events","type":"User","site_admin":false},"repo":{"id":33974953,"name":"cfs","full_name":"yunxing/cfs","owner":{"login":"yunxing","id":1017689,"avatar_url":"https://avatars.githubusercontent.com/u/1017689?v=3","gravatar_id":"","url":"https://api.github.com/users/yunxing","html_url":"https://github.com/yunxing","followers_url":"https://api.github.com/users/yunxing/followers","following_url":"https://api.github.com/users/yunxing/following{/other_user}","gists_url":"https://api.github.com/users/yunxing/gists{/gist_id}","starred_url":"https://api.github.com/users/yunxing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yunxing/subscriptions","organizations_url":"https://api.github.com/users/yunxing/orgs","repos_url":"https://api.github.com/users/yunxing/repos","events_url":"https://api.github.com/users/yunxing/events{/privacy}","received_events_url":"https://api.github.com/users/yunxing/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yunxing/cfs","description":"","fork":true,"url":"https://api.github.com/repos/yunxing/cfs","forks_url":"https://api.github.com/repos/yunxing/cfs/forks","keys_url":"https://api.github.com/repos/yunxing/cfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yunxing/cfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yunxing/cfs/teams","hooks_url":"https://api.github.com/repos/yunxing/cfs/hooks","issue_events_url":"https://api.github.com/repos/yunxing/cfs/issues/events{/number}","events_url":"https://api.github.com/repos/yunxing/cfs/events","assignees_url":"https://api.github.com/repos/yunxing/cfs/assignees{/user}","branches_url":"https://api.github.com/repos/yunxing/cfs/branches{/branch}","tags_url":"https://api.github.com/repos/yunxing/cfs/tags","blobs_url":"https://api.github.com/repos/yunxing/cfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yunxing/cfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yunxing/cfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/yunxing/cfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yunxing/cfs/statuses/{sha}","languages_url":"https://api.github.com/repos/yunxing/cfs/languages","stargazers_url":"https://api.github.com/repos/yunxing/cfs/stargazers","contributors_url":"https://api.github.com/repos/yunxing/cfs/contributors","subscribers_url":"https://api.github.com/repos/yunxing/cfs/subscribers","subscription_url":"https://api.github.com/repos/yunxing/cfs/subscription","commits_url":"https://api.github.com/repos/yunxing/cfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/yunxing/cfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/yunxing/cfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/yunxing/cfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/yunxing/cfs/contents/{+path}","compare_url":"https://api.github.com/repos/yunxing/cfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yunxing/cfs/merges","archive_url":"https://api.github.com/repos/yunxing/cfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yunxing/cfs/downloads","issues_url":"https://api.github.com/repos/yunxing/cfs/issues{/number}","pulls_url":"https://api.github.com/repos/yunxing/cfs/pulls{/number}","milestones_url":"https://api.github.com/repos/yunxing/cfs/milestones{/number}","notifications_url":"https://api.github.com/repos/yunxing/cfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yunxing/cfs/labels{/name}","releases_url":"https://api.github.com/repos/yunxing/cfs/releases{/id}","created_at":"2015-04-15T05:24:34Z","updated_at":"2015-04-15T05:26:06Z","pushed_at":"2015-04-15T05:26:06Z","git_url":"git://github.com/yunxing/cfs.git","ssh_url":"git@github.com:yunxing/cfs.git","clone_url":"https://github.com/yunxing/cfs.git","svn_url":"https://github.com/yunxing/cfs","homepage":null,"size":86,"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":"c-fs:master","ref":"master","sha":"57b497ebd1619525288be021ecfad3f96421badf","user":{"login":"c-fs","id":11731043,"avatar_url":"https://avatars.githubusercontent.com/u/11731043?v=3","gravatar_id":"","url":"https://api.github.com/users/c-fs","html_url":"https://github.com/c-fs","followers_url":"https://api.github.com/users/c-fs/followers","following_url":"https://api.github.com/users/c-fs/following{/other_user}","gists_url":"https://api.github.com/users/c-fs/gists{/gist_id}","starred_url":"https://api.github.com/users/c-fs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c-fs/subscriptions","organizations_url":"https://api.github.com/users/c-fs/orgs","repos_url":"https://api.github.com/users/c-fs/repos","events_url":"https://api.github.com/users/c-fs/events{/privacy}","received_events_url":"https://api.github.com/users/c-fs/received_events","type":"Organization","site_admin":false},"repo":{"id":33709221,"name":"cfs","full_name":"c-fs/cfs","owner":{"login":"c-fs","id":11731043,"avatar_url":"https://avatars.githubusercontent.com/u/11731043?v=3","gravatar_id":"","url":"https://api.github.com/users/c-fs","html_url":"https://github.com/c-fs","followers_url":"https://api.github.com/users/c-fs/followers","following_url":"https://api.github.com/users/c-fs/following{/other_user}","gists_url":"https://api.github.com/users/c-fs/gists{/gist_id}","starred_url":"https://api.github.com/users/c-fs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c-fs/subscriptions","organizations_url":"https://api.github.com/users/c-fs/orgs","repos_url":"https://api.github.com/users/c-fs/repos","events_url":"https://api.github.com/users/c-fs/events{/privacy}","received_events_url":"https://api.github.com/users/c-fs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/c-fs/cfs","description":"","fork":false,"url":"https://api.github.com/repos/c-fs/cfs","forks_url":"https://api.github.com/repos/c-fs/cfs/forks","keys_url":"https://api.github.com/repos/c-fs/cfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/c-fs/cfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/c-fs/cfs/teams","hooks_url":"https://api.github.com/repos/c-fs/cfs/hooks","issue_events_url":"https://api.github.com/repos/c-fs/cfs/issues/events{/number}","events_url":"https://api.github.com/repos/c-fs/cfs/events","assignees_url":"https://api.github.com/repos/c-fs/cfs/assignees{/user}","branches_url":"https://api.github.com/repos/c-fs/cfs/branches{/branch}","tags_url":"https://api.github.com/repos/c-fs/cfs/tags","blobs_url":"https://api.github.com/repos/c-fs/cfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/c-fs/cfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/c-fs/cfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/c-fs/cfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/c-fs/cfs/statuses/{sha}","languages_url":"https://api.github.com/repos/c-fs/cfs/languages","stargazers_url":"https://api.github.com/repos/c-fs/cfs/stargazers","contributors_url":"https://api.github.com/repos/c-fs/cfs/contributors","subscribers_url":"https://api.github.com/repos/c-fs/cfs/subscribers","subscription_url":"https://api.github.com/repos/c-fs/cfs/subscription","commits_url":"https://api.github.com/repos/c-fs/cfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/c-fs/cfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/c-fs/cfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/c-fs/cfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/c-fs/cfs/contents/{+path}","compare_url":"https://api.github.com/repos/c-fs/cfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/c-fs/cfs/merges","archive_url":"https://api.github.com/repos/c-fs/cfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/c-fs/cfs/downloads","issues_url":"https://api.github.com/repos/c-fs/cfs/issues{/number}","pulls_url":"https://api.github.com/repos/c-fs/cfs/pulls{/number}","milestones_url":"https://api.github.com/repos/c-fs/cfs/milestones{/number}","notifications_url":"https://api.github.com/repos/c-fs/cfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/c-fs/cfs/labels{/name}","releases_url":"https://api.github.com/repos/c-fs/cfs/releases{/id}","created_at":"2015-04-10T04:57:56Z","updated_at":"2015-04-10T04:57:56Z","pushed_at":"2015-04-15T05:30:52Z","git_url":"git://github.com/c-fs/cfs.git","ssh_url":"git@github.com:c-fs/cfs.git","clone_url":"https://github.com/c-fs/cfs.git","svn_url":"https://github.com/c-fs/cfs","homepage":null,"size":182,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/c-fs/cfs/pulls/2"},"html":{"href":"https://github.com/c-fs/cfs/pull/2"},"issue":{"href":"https://api.github.com/repos/c-fs/cfs/issues/2"},"comments":{"href":"https://api.github.com/repos/c-fs/cfs/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/c-fs/cfs/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/c-fs/cfs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/c-fs/cfs/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/c-fs/cfs/statuses/1861ffda4193be36fb8a505e6fd55e64d16f1753"}}}}