{"action":"created","comment":{"url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/pulls/comments/178469034","pull_request_review_id":108529043,"id":178469034,"diff_hunk":"@@ -335,30 +336,35 @@ def bytes_terminate(data, term, include_term):\n \n     @staticmethod\n     def process_xor_one(data, key):\n+        if key == 0:\n+            return data\n+\n         if PY2:\n             return bytes(bytearray(v ^ key for v in bytearray(data)))\n         else:\n             return bytes(v ^ key for v in data)\n \n     @staticmethod\n     def process_xor_many(data, key):\n+        if key == b'\\x00' * len(key):\n+            return data\n+        if len(key) == 1:\n+            return KaitaiStream.process_xor_one(data, ord(key))\n+\n         if PY2:\n             return bytes(bytearray(a ^ b for a, b in zip(bytearray(data), itertools.cycle(bytearray(key)))))\n         else:\n             return bytes(a ^ b for a, b in zip(data, itertools.cycle(key)))\n \n+    precomputed_rotations = {(amount,1):[(i << amount) & 0xff | (i >> (-amount & 7)) for i in range(256)] for amount in range(9)}","path":"kaitaistruct.py","position":66,"original_position":66,"commit_id":"c6d569672fc233ce536598a49f0d0ff514acfdc9","original_commit_id":"c6d569672fc233ce536598a49f0d0ff514acfdc9","user":{"login":"KOLANICH","id":240344,"avatar_url":"https://avatars1.githubusercontent.com/u/240344?v=4","gravatar_id":"","url":"https://api.github.com/users/KOLANICH","html_url":"https://github.com/KOLANICH","followers_url":"https://api.github.com/users/KOLANICH/followers","following_url":"https://api.github.com/users/KOLANICH/following{/other_user}","gists_url":"https://api.github.com/users/KOLANICH/gists{/gist_id}","starred_url":"https://api.github.com/users/KOLANICH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KOLANICH/subscriptions","organizations_url":"https://api.github.com/users/KOLANICH/orgs","repos_url":"https://api.github.com/users/KOLANICH/repos","events_url":"https://api.github.com/users/KOLANICH/events{/privacy}","received_events_url":"https://api.github.com/users/KOLANICH/received_events","type":"User","site_admin":false},"body":">I am unable to run a benchmark.\r\n\r\nthere is no need to run kaitai benchmark, just an own benchmark\r\n\r\n","created_at":"2018-04-01T21:11:13Z","updated_at":"2018-04-01T21:11:14Z","html_url":"https://github.com/kaitai-io/kaitai_struct_python_runtime/pull/28#discussion_r178469034","pull_request_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/pulls/28","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/pulls/comments/178469034"},"html":{"href":"https://github.com/kaitai-io/kaitai_struct_python_runtime/pull/28#discussion_r178469034"},"pull_request":{"href":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/pulls/28"}},"in_reply_to_id":178468653},"pull_request":{"url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/pulls/28","id":178734858,"html_url":"https://github.com/kaitai-io/kaitai_struct_python_runtime/pull/28","diff_url":"https://github.com/kaitai-io/kaitai_struct_python_runtime/pull/28.diff","patch_url":"https://github.com/kaitai-io/kaitai_struct_python_runtime/pull/28.patch","issue_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/issues/28","number":28,"state":"open","locked":false,"title":"seek, process xor, and process rotate optimisations","user":{"login":"arekbulski","id":5385838,"avatar_url":"https://avatars2.githubusercontent.com/u/5385838?v=4","gravatar_id":"","url":"https://api.github.com/users/arekbulski","html_url":"https://github.com/arekbulski","followers_url":"https://api.github.com/users/arekbulski/followers","following_url":"https://api.github.com/users/arekbulski/following{/other_user}","gists_url":"https://api.github.com/users/arekbulski/gists{/gist_id}","starred_url":"https://api.github.com/users/arekbulski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arekbulski/subscriptions","organizations_url":"https://api.github.com/users/arekbulski/orgs","repos_url":"https://api.github.com/users/arekbulski/repos","events_url":"https://api.github.com/users/arekbulski/events{/privacy}","received_events_url":"https://api.github.com/users/arekbulski/received_events","type":"User","site_admin":false},"body":"Effectuates:\r\nhttps://github.com/kaitai-io/kaitai_struct/issues/390\r\nhttps://github.com/kaitai-io/kaitai_struct/issues/397\r\n\r\nI ran the test suite but please confirm it. Also I leave running the benchmarks to you, because I am not able to run those.","created_at":"2018-04-01T15:47:44Z","updated_at":"2018-04-01T21:11:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b2c26a3ac7983f66854ff3d900a87be662b5b137","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/pulls/28/commits","review_comments_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/pulls/28/comments","review_comment_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/issues/28/comments","statuses_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/statuses/c6d569672fc233ce536598a49f0d0ff514acfdc9","head":{"label":"kaitai-io:patch-seek","ref":"patch-seek","sha":"c6d569672fc233ce536598a49f0d0ff514acfdc9","user":{"login":"kaitai-io","id":17322584,"avatar_url":"https://avatars2.githubusercontent.com/u/17322584?v=4","gravatar_id":"","url":"https://api.github.com/users/kaitai-io","html_url":"https://github.com/kaitai-io","followers_url":"https://api.github.com/users/kaitai-io/followers","following_url":"https://api.github.com/users/kaitai-io/following{/other_user}","gists_url":"https://api.github.com/users/kaitai-io/gists{/gist_id}","starred_url":"https://api.github.com/users/kaitai-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaitai-io/subscriptions","organizations_url":"https://api.github.com/users/kaitai-io/orgs","repos_url":"https://api.github.com/users/kaitai-io/repos","events_url":"https://api.github.com/users/kaitai-io/events{/privacy}","received_events_url":"https://api.github.com/users/kaitai-io/received_events","type":"Organization","site_admin":false},"repo":{"id":52151902,"name":"kaitai_struct_python_runtime","full_name":"kaitai-io/kaitai_struct_python_runtime","owner":{"login":"kaitai-io","id":17322584,"avatar_url":"https://avatars2.githubusercontent.com/u/17322584?v=4","gravatar_id":"","url":"https://api.github.com/users/kaitai-io","html_url":"https://github.com/kaitai-io","followers_url":"https://api.github.com/users/kaitai-io/followers","following_url":"https://api.github.com/users/kaitai-io/following{/other_user}","gists_url":"https://api.github.com/users/kaitai-io/gists{/gist_id}","starred_url":"https://api.github.com/users/kaitai-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaitai-io/subscriptions","organizations_url":"https://api.github.com/users/kaitai-io/orgs","repos_url":"https://api.github.com/users/kaitai-io/repos","events_url":"https://api.github.com/users/kaitai-io/events{/privacy}","received_events_url":"https://api.github.com/users/kaitai-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kaitai-io/kaitai_struct_python_runtime","description":"Kaitai Struct: runtime for Python","fork":false,"url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime","forks_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/forks","keys_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/teams","hooks_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/hooks","issue_events_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/issues/events{/number}","events_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/events","assignees_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/assignees{/user}","branches_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/branches{/branch}","tags_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/tags","blobs_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/statuses/{sha}","languages_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/languages","stargazers_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/stargazers","contributors_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/contributors","subscribers_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/subscribers","subscription_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/subscription","commits_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/contents/{+path}","compare_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/merges","archive_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/downloads","issues_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/issues{/number}","pulls_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/pulls{/number}","milestones_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/milestones{/number}","notifications_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/labels{/name}","releases_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/releases{/id}","deployments_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/deployments","created_at":"2016-02-20T12:20:35Z","updated_at":"2018-04-01T08:10:58Z","pushed_at":"2018-04-01T18:25:15Z","git_url":"git://github.com/kaitai-io/kaitai_struct_python_runtime.git","ssh_url":"git@github.com:kaitai-io/kaitai_struct_python_runtime.git","clone_url":"https://github.com/kaitai-io/kaitai_struct_python_runtime.git","svn_url":"https://github.com/kaitai-io/kaitai_struct_python_runtime","homepage":null,"size":55,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":6,"license":null,"forks":7,"open_issues":6,"watchers":13,"default_branch":"master"}},"base":{"label":"kaitai-io:master","ref":"master","sha":"5dfb881636c86f4e6a7778b7c513174d8ccfffe2","user":{"login":"kaitai-io","id":17322584,"avatar_url":"https://avatars2.githubusercontent.com/u/17322584?v=4","gravatar_id":"","url":"https://api.github.com/users/kaitai-io","html_url":"https://github.com/kaitai-io","followers_url":"https://api.github.com/users/kaitai-io/followers","following_url":"https://api.github.com/users/kaitai-io/following{/other_user}","gists_url":"https://api.github.com/users/kaitai-io/gists{/gist_id}","starred_url":"https://api.github.com/users/kaitai-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaitai-io/subscriptions","organizations_url":"https://api.github.com/users/kaitai-io/orgs","repos_url":"https://api.github.com/users/kaitai-io/repos","events_url":"https://api.github.com/users/kaitai-io/events{/privacy}","received_events_url":"https://api.github.com/users/kaitai-io/received_events","type":"Organization","site_admin":false},"repo":{"id":52151902,"name":"kaitai_struct_python_runtime","full_name":"kaitai-io/kaitai_struct_python_runtime","owner":{"login":"kaitai-io","id":17322584,"avatar_url":"https://avatars2.githubusercontent.com/u/17322584?v=4","gravatar_id":"","url":"https://api.github.com/users/kaitai-io","html_url":"https://github.com/kaitai-io","followers_url":"https://api.github.com/users/kaitai-io/followers","following_url":"https://api.github.com/users/kaitai-io/following{/other_user}","gists_url":"https://api.github.com/users/kaitai-io/gists{/gist_id}","starred_url":"https://api.github.com/users/kaitai-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaitai-io/subscriptions","organizations_url":"https://api.github.com/users/kaitai-io/orgs","repos_url":"https://api.github.com/users/kaitai-io/repos","events_url":"https://api.github.com/users/kaitai-io/events{/privacy}","received_events_url":"https://api.github.com/users/kaitai-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kaitai-io/kaitai_struct_python_runtime","description":"Kaitai Struct: runtime for Python","fork":false,"url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime","forks_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/forks","keys_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/teams","hooks_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/hooks","issue_events_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/issues/events{/number}","events_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/events","assignees_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/assignees{/user}","branches_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/branches{/branch}","tags_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/tags","blobs_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/statuses/{sha}","languages_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/languages","stargazers_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/stargazers","contributors_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/contributors","subscribers_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/subscribers","subscription_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/subscription","commits_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/contents/{+path}","compare_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/merges","archive_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/downloads","issues_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/issues{/number}","pulls_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/pulls{/number}","milestones_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/milestones{/number}","notifications_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/labels{/name}","releases_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/releases{/id}","deployments_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/deployments","created_at":"2016-02-20T12:20:35Z","updated_at":"2018-04-01T08:10:58Z","pushed_at":"2018-04-01T18:25:15Z","git_url":"git://github.com/kaitai-io/kaitai_struct_python_runtime.git","ssh_url":"git@github.com:kaitai-io/kaitai_struct_python_runtime.git","clone_url":"https://github.com/kaitai-io/kaitai_struct_python_runtime.git","svn_url":"https://github.com/kaitai-io/kaitai_struct_python_runtime","homepage":null,"size":55,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":6,"license":null,"forks":7,"open_issues":6,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/pulls/28"},"html":{"href":"https://github.com/kaitai-io/kaitai_struct_python_runtime/pull/28"},"issue":{"href":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/issues/28"},"comments":{"href":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/kaitai-io/kaitai_struct_python_runtime/statuses/c6d569672fc233ce536598a49f0d0ff514acfdc9"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"KOLANICH"}}