{"action":"created","comment":{"url":"https://api.github.com/repos/ghewgill/neon-lang/pulls/comments/48789748","id":48789748,"diff_hunk":"@@ -0,0 +1,159 @@\n+%|\n+ |  File: encoding\n+ |\n+ |  Functions for encoding and decoding ASCII or Binary data in various formats.\n+ |%\n+IMPORT bitwise\n+\n+EXPORT base64Encode\n+EXPORT base64Decode\n+\n+TYPE Mode IS ENUM\n+    BYTE1\n+    BYTE2\n+    BYTE3\n+    BYTE4\n+END ENUM\n+\n+CONSTANT Base64EncodeTable: String := \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"\n+\n+CONSTANT Base64DecodeTable: Array<Number> := [\n+    255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,    % 0x00 - 0x0f\n+    255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,    % 0x10 - 0x1f\n+    255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,  62, 255, 255, 255,  63,    % 0x20 - 0x2f\n+     52,  53,  54,  55,  56,  57,  58,  59,  60,  61, 255, 255, 255,  64, 255, 255,    % 0x30 - 0x3f\n+    255,   0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,    % 0x40 - 0x4f\n+     15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25, 255, 255, 255, 255, 255,    % 0x50 - 0x5f\n+    255,  26,  27,  28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,    % 0x60 - 0x6f\n+     41,  42,  43,  44,  45,  46,  47,  48,  49,  50,  51, 255, 255, 255, 255, 255,    % 0x70 - 0x7f\n+    % This table simply ignores these values.\n+    255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,    % 0x80 - 0x8f\n+    255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,    % 0x90 - 0x9f\n+    255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,    % 0xa0 - 0xaf\n+    255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,    % 0xb0 - 0xbf\n+    255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,    % 0xc0 - 0xcf\n+    255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,    % 0xd0 - 0xdf\n+    255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,    % 0xe0 - 0xef\n+    255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,    % 0xf0 - 0xff\n+]\n+\n+%|\n+ |  Function: base64Encode\n+ |\n+ |  Encodes the provided string into Base64 encoded data.\n+ |\n+ |  Parameters:\n+ |      src - The source data to encode.\n+ |\n+ |%\n+FUNCTION base64Encode(src: Bytes): String\n+    VAR i: Number := 0\n+    VAR encoded: String := \"\"\n+    VAR char1, char2: Number","path":"lib/encoding.neon","position":52,"original_position":52,"commit_id":"de3d4bd4bc83a62af5d2b0a8313f2781afa16dfb","original_commit_id":"de3d4bd4bc83a62af5d2b0a8313f2781afa16dfb","user":{"login":"ghewgill","id":17221,"avatar_url":"https://avatars.githubusercontent.com/u/17221?v=3","gravatar_id":"","url":"https://api.github.com/users/ghewgill","html_url":"https://github.com/ghewgill","followers_url":"https://api.github.com/users/ghewgill/followers","following_url":"https://api.github.com/users/ghewgill/following{/other_user}","gists_url":"https://api.github.com/users/ghewgill/gists{/gist_id}","starred_url":"https://api.github.com/users/ghewgill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghewgill/subscriptions","organizations_url":"https://api.github.com/users/ghewgill/orgs","repos_url":"https://api.github.com/users/ghewgill/repos","events_url":"https://api.github.com/users/ghewgill/events{/privacy}","received_events_url":"https://api.github.com/users/ghewgill/received_events","type":"User","site_admin":false},"body":"You don't actually need two variables here, because you never use both `char1` and `char2` at the same time. Just one would suffice.","created_at":"2016-01-04T22:19:32Z","updated_at":"2016-01-04T22:19:32Z","html_url":"https://github.com/ghewgill/neon-lang/pull/114#discussion_r48789748","pull_request_url":"https://api.github.com/repos/ghewgill/neon-lang/pulls/114","_links":{"self":{"href":"https://api.github.com/repos/ghewgill/neon-lang/pulls/comments/48789748"},"html":{"href":"https://github.com/ghewgill/neon-lang/pull/114#discussion_r48789748"},"pull_request":{"href":"https://api.github.com/repos/ghewgill/neon-lang/pulls/114"}}},"pull_request":{"url":"https://api.github.com/repos/ghewgill/neon-lang/pulls/114","id":55021823,"html_url":"https://github.com/ghewgill/neon-lang/pull/114","diff_url":"https://github.com/ghewgill/neon-lang/pull/114.diff","patch_url":"https://github.com/ghewgill/neon-lang/pull/114.patch","issue_url":"https://api.github.com/repos/ghewgill/neon-lang/issues/114","number":114,"state":"open","locked":false,"title":"added binary encoding/decoding lib","user":{"login":"gitlarryf","id":8064499,"avatar_url":"https://avatars.githubusercontent.com/u/8064499?v=3","gravatar_id":"","url":"https://api.github.com/users/gitlarryf","html_url":"https://github.com/gitlarryf","followers_url":"https://api.github.com/users/gitlarryf/followers","following_url":"https://api.github.com/users/gitlarryf/following{/other_user}","gists_url":"https://api.github.com/users/gitlarryf/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlarryf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlarryf/subscriptions","organizations_url":"https://api.github.com/users/gitlarryf/orgs","repos_url":"https://api.github.com/users/gitlarryf/repos","events_url":"https://api.github.com/users/gitlarryf/events{/privacy}","received_events_url":"https://api.github.com/users/gitlarryf/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-04T21:04:21Z","updated_at":"2016-01-04T22:19:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ddbb0e735d19b8f1e75559b1a6aa412adf49ca0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ghewgill/neon-lang/pulls/114/commits","review_comments_url":"https://api.github.com/repos/ghewgill/neon-lang/pulls/114/comments","review_comment_url":"https://api.github.com/repos/ghewgill/neon-lang/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ghewgill/neon-lang/issues/114/comments","statuses_url":"https://api.github.com/repos/ghewgill/neon-lang/statuses/de3d4bd4bc83a62af5d2b0a8313f2781afa16dfb","head":{"label":"gitlarryf:encoding-libs","ref":"encoding-libs","sha":"de3d4bd4bc83a62af5d2b0a8313f2781afa16dfb","user":{"login":"gitlarryf","id":8064499,"avatar_url":"https://avatars.githubusercontent.com/u/8064499?v=3","gravatar_id":"","url":"https://api.github.com/users/gitlarryf","html_url":"https://github.com/gitlarryf","followers_url":"https://api.github.com/users/gitlarryf/followers","following_url":"https://api.github.com/users/gitlarryf/following{/other_user}","gists_url":"https://api.github.com/users/gitlarryf/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlarryf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlarryf/subscriptions","organizations_url":"https://api.github.com/users/gitlarryf/orgs","repos_url":"https://api.github.com/users/gitlarryf/repos","events_url":"https://api.github.com/users/gitlarryf/events{/privacy}","received_events_url":"https://api.github.com/users/gitlarryf/received_events","type":"User","site_admin":false},"repo":{"id":25283698,"name":"neon-lang","full_name":"gitlarryf/neon-lang","owner":{"login":"gitlarryf","id":8064499,"avatar_url":"https://avatars.githubusercontent.com/u/8064499?v=3","gravatar_id":"","url":"https://api.github.com/users/gitlarryf","html_url":"https://github.com/gitlarryf","followers_url":"https://api.github.com/users/gitlarryf/followers","following_url":"https://api.github.com/users/gitlarryf/following{/other_user}","gists_url":"https://api.github.com/users/gitlarryf/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlarryf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlarryf/subscriptions","organizations_url":"https://api.github.com/users/gitlarryf/orgs","repos_url":"https://api.github.com/users/gitlarryf/repos","events_url":"https://api.github.com/users/gitlarryf/events{/privacy}","received_events_url":"https://api.github.com/users/gitlarryf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gitlarryf/neon-lang","description":"Implementation of a simple programming language","fork":true,"url":"https://api.github.com/repos/gitlarryf/neon-lang","forks_url":"https://api.github.com/repos/gitlarryf/neon-lang/forks","keys_url":"https://api.github.com/repos/gitlarryf/neon-lang/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gitlarryf/neon-lang/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gitlarryf/neon-lang/teams","hooks_url":"https://api.github.com/repos/gitlarryf/neon-lang/hooks","issue_events_url":"https://api.github.com/repos/gitlarryf/neon-lang/issues/events{/number}","events_url":"https://api.github.com/repos/gitlarryf/neon-lang/events","assignees_url":"https://api.github.com/repos/gitlarryf/neon-lang/assignees{/user}","branches_url":"https://api.github.com/repos/gitlarryf/neon-lang/branches{/branch}","tags_url":"https://api.github.com/repos/gitlarryf/neon-lang/tags","blobs_url":"https://api.github.com/repos/gitlarryf/neon-lang/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gitlarryf/neon-lang/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gitlarryf/neon-lang/git/refs{/sha}","trees_url":"https://api.github.com/repos/gitlarryf/neon-lang/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gitlarryf/neon-lang/statuses/{sha}","languages_url":"https://api.github.com/repos/gitlarryf/neon-lang/languages","stargazers_url":"https://api.github.com/repos/gitlarryf/neon-lang/stargazers","contributors_url":"https://api.github.com/repos/gitlarryf/neon-lang/contributors","subscribers_url":"https://api.github.com/repos/gitlarryf/neon-lang/subscribers","subscription_url":"https://api.github.com/repos/gitlarryf/neon-lang/subscription","commits_url":"https://api.github.com/repos/gitlarryf/neon-lang/commits{/sha}","git_commits_url":"https://api.github.com/repos/gitlarryf/neon-lang/git/commits{/sha}","comments_url":"https://api.github.com/repos/gitlarryf/neon-lang/comments{/number}","issue_comment_url":"https://api.github.com/repos/gitlarryf/neon-lang/issues/comments{/number}","contents_url":"https://api.github.com/repos/gitlarryf/neon-lang/contents/{+path}","compare_url":"https://api.github.com/repos/gitlarryf/neon-lang/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gitlarryf/neon-lang/merges","archive_url":"https://api.github.com/repos/gitlarryf/neon-lang/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gitlarryf/neon-lang/downloads","issues_url":"https://api.github.com/repos/gitlarryf/neon-lang/issues{/number}","pulls_url":"https://api.github.com/repos/gitlarryf/neon-lang/pulls{/number}","milestones_url":"https://api.github.com/repos/gitlarryf/neon-lang/milestones{/number}","notifications_url":"https://api.github.com/repos/gitlarryf/neon-lang/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gitlarryf/neon-lang/labels{/name}","releases_url":"https://api.github.com/repos/gitlarryf/neon-lang/releases{/id}","created_at":"2014-10-16T02:48:55Z","updated_at":"2015-01-07T23:20:38Z","pushed_at":"2016-01-04T21:03:27Z","git_url":"git://github.com/gitlarryf/neon-lang.git","ssh_url":"git@github.com:gitlarryf/neon-lang.git","clone_url":"https://github.com/gitlarryf/neon-lang.git","svn_url":"https://github.com/gitlarryf/neon-lang","homepage":null,"size":29297,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ghewgill:master","ref":"master","sha":"46116dfda0aba3377f3adf368dd1584793c06fc5","user":{"login":"ghewgill","id":17221,"avatar_url":"https://avatars.githubusercontent.com/u/17221?v=3","gravatar_id":"","url":"https://api.github.com/users/ghewgill","html_url":"https://github.com/ghewgill","followers_url":"https://api.github.com/users/ghewgill/followers","following_url":"https://api.github.com/users/ghewgill/following{/other_user}","gists_url":"https://api.github.com/users/ghewgill/gists{/gist_id}","starred_url":"https://api.github.com/users/ghewgill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghewgill/subscriptions","organizations_url":"https://api.github.com/users/ghewgill/orgs","repos_url":"https://api.github.com/users/ghewgill/repos","events_url":"https://api.github.com/users/ghewgill/events{/privacy}","received_events_url":"https://api.github.com/users/ghewgill/received_events","type":"User","site_admin":false},"repo":{"id":22769864,"name":"neon-lang","full_name":"ghewgill/neon-lang","owner":{"login":"ghewgill","id":17221,"avatar_url":"https://avatars.githubusercontent.com/u/17221?v=3","gravatar_id":"","url":"https://api.github.com/users/ghewgill","html_url":"https://github.com/ghewgill","followers_url":"https://api.github.com/users/ghewgill/followers","following_url":"https://api.github.com/users/ghewgill/following{/other_user}","gists_url":"https://api.github.com/users/ghewgill/gists{/gist_id}","starred_url":"https://api.github.com/users/ghewgill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghewgill/subscriptions","organizations_url":"https://api.github.com/users/ghewgill/orgs","repos_url":"https://api.github.com/users/ghewgill/repos","events_url":"https://api.github.com/users/ghewgill/events{/privacy}","received_events_url":"https://api.github.com/users/ghewgill/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ghewgill/neon-lang","description":"Implementation of a simple programming language","fork":false,"url":"https://api.github.com/repos/ghewgill/neon-lang","forks_url":"https://api.github.com/repos/ghewgill/neon-lang/forks","keys_url":"https://api.github.com/repos/ghewgill/neon-lang/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ghewgill/neon-lang/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ghewgill/neon-lang/teams","hooks_url":"https://api.github.com/repos/ghewgill/neon-lang/hooks","issue_events_url":"https://api.github.com/repos/ghewgill/neon-lang/issues/events{/number}","events_url":"https://api.github.com/repos/ghewgill/neon-lang/events","assignees_url":"https://api.github.com/repos/ghewgill/neon-lang/assignees{/user}","branches_url":"https://api.github.com/repos/ghewgill/neon-lang/branches{/branch}","tags_url":"https://api.github.com/repos/ghewgill/neon-lang/tags","blobs_url":"https://api.github.com/repos/ghewgill/neon-lang/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ghewgill/neon-lang/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ghewgill/neon-lang/git/refs{/sha}","trees_url":"https://api.github.com/repos/ghewgill/neon-lang/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ghewgill/neon-lang/statuses/{sha}","languages_url":"https://api.github.com/repos/ghewgill/neon-lang/languages","stargazers_url":"https://api.github.com/repos/ghewgill/neon-lang/stargazers","contributors_url":"https://api.github.com/repos/ghewgill/neon-lang/contributors","subscribers_url":"https://api.github.com/repos/ghewgill/neon-lang/subscribers","subscription_url":"https://api.github.com/repos/ghewgill/neon-lang/subscription","commits_url":"https://api.github.com/repos/ghewgill/neon-lang/commits{/sha}","git_commits_url":"https://api.github.com/repos/ghewgill/neon-lang/git/commits{/sha}","comments_url":"https://api.github.com/repos/ghewgill/neon-lang/comments{/number}","issue_comment_url":"https://api.github.com/repos/ghewgill/neon-lang/issues/comments{/number}","contents_url":"https://api.github.com/repos/ghewgill/neon-lang/contents/{+path}","compare_url":"https://api.github.com/repos/ghewgill/neon-lang/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ghewgill/neon-lang/merges","archive_url":"https://api.github.com/repos/ghewgill/neon-lang/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ghewgill/neon-lang/downloads","issues_url":"https://api.github.com/repos/ghewgill/neon-lang/issues{/number}","pulls_url":"https://api.github.com/repos/ghewgill/neon-lang/pulls{/number}","milestones_url":"https://api.github.com/repos/ghewgill/neon-lang/milestones{/number}","notifications_url":"https://api.github.com/repos/ghewgill/neon-lang/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ghewgill/neon-lang/labels{/name}","releases_url":"https://api.github.com/repos/ghewgill/neon-lang/releases{/id}","created_at":"2014-08-08T19:59:17Z","updated_at":"2015-05-03T21:47:31Z","pushed_at":"2016-01-04T21:04:23Z","git_url":"git://github.com/ghewgill/neon-lang.git","ssh_url":"git@github.com:ghewgill/neon-lang.git","clone_url":"https://github.com/ghewgill/neon-lang.git","svn_url":"https://github.com/ghewgill/neon-lang","homepage":null,"size":29335,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":26,"forks":2,"open_issues":26,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ghewgill/neon-lang/pulls/114"},"html":{"href":"https://github.com/ghewgill/neon-lang/pull/114"},"issue":{"href":"https://api.github.com/repos/ghewgill/neon-lang/issues/114"},"comments":{"href":"https://api.github.com/repos/ghewgill/neon-lang/issues/114/comments"},"review_comments":{"href":"https://api.github.com/repos/ghewgill/neon-lang/pulls/114/comments"},"review_comment":{"href":"https://api.github.com/repos/ghewgill/neon-lang/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ghewgill/neon-lang/pulls/114/commits"},"statuses":{"href":"https://api.github.com/repos/ghewgill/neon-lang/statuses/de3d4bd4bc83a62af5d2b0a8313f2781afa16dfb"}}}}