{"action":"created","comment":{"url":"https://api.github.com/repos/FLIF-hub/FLIF/pulls/comments/42707312","id":42707312,"diff_hunk":"@@ -55,3 +56,204 @@ class FileIO\n       return name;\n     }\n };\n+\n+/*!\n+ * Read-only IO interface for a constant memory block\n+ */\n+class BlobReader\n+{\n+private:\n+    const uint8_t* data;\n+    size_t data_array_size;\n+    size_t seek_pos;\n+public:\n+    BlobReader(const uint8_t* _data, size_t _data_array_size)\n+    : data(_data)\n+    , data_array_size(_data_array_size)\n+    , seek_pos(0)\n+    {\n+    }\n+\n+    int read() {\n+        int c = getc();\n+        if(c == EOF)\n+            return 0;\n+        return c;\n+    }\n+    void write(int byte) {\n+        // cannot write on const memory","path":"fileio.h","position":37,"original_position":37,"commit_id":"80938d104e7fc8856e74b9dee778a47f5b251882","original_commit_id":"80938d104e7fc8856e74b9dee778a47f5b251882","user":{"login":"hrj","id":345879,"avatar_url":"https://avatars.githubusercontent.com/u/345879?v=3","gravatar_id":"","url":"https://api.github.com/users/hrj","html_url":"https://github.com/hrj","followers_url":"https://api.github.com/users/hrj/followers","following_url":"https://api.github.com/users/hrj/following{/other_user}","gists_url":"https://api.github.com/users/hrj/gists{/gist_id}","starred_url":"https://api.github.com/users/hrj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hrj/subscriptions","organizations_url":"https://api.github.com/users/hrj/orgs","repos_url":"https://api.github.com/users/hrj/repos","events_url":"https://api.github.com/users/hrj/events{/privacy}","received_events_url":"https://api.github.com/users/hrj/received_events","type":"User","site_admin":false},"body":"I don't know if it standard practice in C++, but you could throw an \"illegal operation\" exception here.","created_at":"2015-10-22T03:02:54Z","updated_at":"2015-10-22T03:02:54Z","html_url":"https://github.com/FLIF-hub/FLIF/pull/110#discussion_r42707312","pull_request_url":"https://api.github.com/repos/FLIF-hub/FLIF/pulls/110","_links":{"self":{"href":"https://api.github.com/repos/FLIF-hub/FLIF/pulls/comments/42707312"},"html":{"href":"https://github.com/FLIF-hub/FLIF/pull/110#discussion_r42707312"},"pull_request":{"href":"https://api.github.com/repos/FLIF-hub/FLIF/pulls/110"}}},"pull_request":{"url":"https://api.github.com/repos/FLIF-hub/FLIF/pulls/110","id":48395271,"html_url":"https://github.com/FLIF-hub/FLIF/pull/110","diff_url":"https://github.com/FLIF-hub/FLIF/pull/110.diff","patch_url":"https://github.com/FLIF-hub/FLIF/pull/110.patch","issue_url":"https://api.github.com/repos/FLIF-hub/FLIF/issues/110","number":110,"state":"open","locked":false,"title":"in-memory decoding/encoding.","user":{"login":"fherzog2","id":14953373,"avatar_url":"https://avatars.githubusercontent.com/u/14953373?v=3","gravatar_id":"","url":"https://api.github.com/users/fherzog2","html_url":"https://github.com/fherzog2","followers_url":"https://api.github.com/users/fherzog2/followers","following_url":"https://api.github.com/users/fherzog2/following{/other_user}","gists_url":"https://api.github.com/users/fherzog2/gists{/gist_id}","starred_url":"https://api.github.com/users/fherzog2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fherzog2/subscriptions","organizations_url":"https://api.github.com/users/fherzog2/orgs","repos_url":"https://api.github.com/users/fherzog2/repos","events_url":"https://api.github.com/users/fherzog2/events{/privacy}","received_events_url":"https://api.github.com/users/fherzog2/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-21T22:14:15Z","updated_at":"2015-10-22T03:02:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bea0c2feea7ede366321941175012949a52f2e77","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/FLIF-hub/FLIF/pulls/110/commits","review_comments_url":"https://api.github.com/repos/FLIF-hub/FLIF/pulls/110/comments","review_comment_url":"https://api.github.com/repos/FLIF-hub/FLIF/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FLIF-hub/FLIF/issues/110/comments","statuses_url":"https://api.github.com/repos/FLIF-hub/FLIF/statuses/80938d104e7fc8856e74b9dee778a47f5b251882","head":{"label":"fherzog2:master","ref":"master","sha":"80938d104e7fc8856e74b9dee778a47f5b251882","user":{"login":"fherzog2","id":14953373,"avatar_url":"https://avatars.githubusercontent.com/u/14953373?v=3","gravatar_id":"","url":"https://api.github.com/users/fherzog2","html_url":"https://github.com/fherzog2","followers_url":"https://api.github.com/users/fherzog2/followers","following_url":"https://api.github.com/users/fherzog2/following{/other_user}","gists_url":"https://api.github.com/users/fherzog2/gists{/gist_id}","starred_url":"https://api.github.com/users/fherzog2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fherzog2/subscriptions","organizations_url":"https://api.github.com/users/fherzog2/orgs","repos_url":"https://api.github.com/users/fherzog2/repos","events_url":"https://api.github.com/users/fherzog2/events{/privacy}","received_events_url":"https://api.github.com/users/fherzog2/received_events","type":"User","site_admin":false},"repo":{"id":43773552,"name":"FLIF","full_name":"fherzog2/FLIF","owner":{"login":"fherzog2","id":14953373,"avatar_url":"https://avatars.githubusercontent.com/u/14953373?v=3","gravatar_id":"","url":"https://api.github.com/users/fherzog2","html_url":"https://github.com/fherzog2","followers_url":"https://api.github.com/users/fherzog2/followers","following_url":"https://api.github.com/users/fherzog2/following{/other_user}","gists_url":"https://api.github.com/users/fherzog2/gists{/gist_id}","starred_url":"https://api.github.com/users/fherzog2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fherzog2/subscriptions","organizations_url":"https://api.github.com/users/fherzog2/orgs","repos_url":"https://api.github.com/users/fherzog2/repos","events_url":"https://api.github.com/users/fherzog2/events{/privacy}","received_events_url":"https://api.github.com/users/fherzog2/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fherzog2/FLIF","description":"Free Lossless Image Format","fork":true,"url":"https://api.github.com/repos/fherzog2/FLIF","forks_url":"https://api.github.com/repos/fherzog2/FLIF/forks","keys_url":"https://api.github.com/repos/fherzog2/FLIF/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fherzog2/FLIF/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fherzog2/FLIF/teams","hooks_url":"https://api.github.com/repos/fherzog2/FLIF/hooks","issue_events_url":"https://api.github.com/repos/fherzog2/FLIF/issues/events{/number}","events_url":"https://api.github.com/repos/fherzog2/FLIF/events","assignees_url":"https://api.github.com/repos/fherzog2/FLIF/assignees{/user}","branches_url":"https://api.github.com/repos/fherzog2/FLIF/branches{/branch}","tags_url":"https://api.github.com/repos/fherzog2/FLIF/tags","blobs_url":"https://api.github.com/repos/fherzog2/FLIF/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fherzog2/FLIF/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fherzog2/FLIF/git/refs{/sha}","trees_url":"https://api.github.com/repos/fherzog2/FLIF/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fherzog2/FLIF/statuses/{sha}","languages_url":"https://api.github.com/repos/fherzog2/FLIF/languages","stargazers_url":"https://api.github.com/repos/fherzog2/FLIF/stargazers","contributors_url":"https://api.github.com/repos/fherzog2/FLIF/contributors","subscribers_url":"https://api.github.com/repos/fherzog2/FLIF/subscribers","subscription_url":"https://api.github.com/repos/fherzog2/FLIF/subscription","commits_url":"https://api.github.com/repos/fherzog2/FLIF/commits{/sha}","git_commits_url":"https://api.github.com/repos/fherzog2/FLIF/git/commits{/sha}","comments_url":"https://api.github.com/repos/fherzog2/FLIF/comments{/number}","issue_comment_url":"https://api.github.com/repos/fherzog2/FLIF/issues/comments{/number}","contents_url":"https://api.github.com/repos/fherzog2/FLIF/contents/{+path}","compare_url":"https://api.github.com/repos/fherzog2/FLIF/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fherzog2/FLIF/merges","archive_url":"https://api.github.com/repos/fherzog2/FLIF/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fherzog2/FLIF/downloads","issues_url":"https://api.github.com/repos/fherzog2/FLIF/issues{/number}","pulls_url":"https://api.github.com/repos/fherzog2/FLIF/pulls{/number}","milestones_url":"https://api.github.com/repos/fherzog2/FLIF/milestones{/number}","notifications_url":"https://api.github.com/repos/fherzog2/FLIF/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fherzog2/FLIF/labels{/name}","releases_url":"https://api.github.com/repos/fherzog2/FLIF/releases{/id}","created_at":"2015-10-06T19:30:34Z","updated_at":"2015-10-06T19:30:35Z","pushed_at":"2015-10-21T22:12:17Z","git_url":"git://github.com/fherzog2/FLIF.git","ssh_url":"git@github.com:fherzog2/FLIF.git","clone_url":"https://github.com/fherzog2/FLIF.git","svn_url":"https://github.com/fherzog2/FLIF","homepage":null,"size":17214,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"FLIF-hub:master","ref":"master","sha":"4dc7db5d978ac7a8b7ea883a0aa9cc57d41bc153","user":{"login":"FLIF-hub","id":1098969,"avatar_url":"https://avatars.githubusercontent.com/u/1098969?v=3","gravatar_id":"","url":"https://api.github.com/users/FLIF-hub","html_url":"https://github.com/FLIF-hub","followers_url":"https://api.github.com/users/FLIF-hub/followers","following_url":"https://api.github.com/users/FLIF-hub/following{/other_user}","gists_url":"https://api.github.com/users/FLIF-hub/gists{/gist_id}","starred_url":"https://api.github.com/users/FLIF-hub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FLIF-hub/subscriptions","organizations_url":"https://api.github.com/users/FLIF-hub/orgs","repos_url":"https://api.github.com/users/FLIF-hub/repos","events_url":"https://api.github.com/users/FLIF-hub/events{/privacy}","received_events_url":"https://api.github.com/users/FLIF-hub/received_events","type":"Organization","site_admin":false},"repo":{"id":42050752,"name":"FLIF","full_name":"FLIF-hub/FLIF","owner":{"login":"FLIF-hub","id":1098969,"avatar_url":"https://avatars.githubusercontent.com/u/1098969?v=3","gravatar_id":"","url":"https://api.github.com/users/FLIF-hub","html_url":"https://github.com/FLIF-hub","followers_url":"https://api.github.com/users/FLIF-hub/followers","following_url":"https://api.github.com/users/FLIF-hub/following{/other_user}","gists_url":"https://api.github.com/users/FLIF-hub/gists{/gist_id}","starred_url":"https://api.github.com/users/FLIF-hub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FLIF-hub/subscriptions","organizations_url":"https://api.github.com/users/FLIF-hub/orgs","repos_url":"https://api.github.com/users/FLIF-hub/repos","events_url":"https://api.github.com/users/FLIF-hub/events{/privacy}","received_events_url":"https://api.github.com/users/FLIF-hub/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FLIF-hub/FLIF","description":"Free Lossless Image Format","fork":false,"url":"https://api.github.com/repos/FLIF-hub/FLIF","forks_url":"https://api.github.com/repos/FLIF-hub/FLIF/forks","keys_url":"https://api.github.com/repos/FLIF-hub/FLIF/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FLIF-hub/FLIF/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FLIF-hub/FLIF/teams","hooks_url":"https://api.github.com/repos/FLIF-hub/FLIF/hooks","issue_events_url":"https://api.github.com/repos/FLIF-hub/FLIF/issues/events{/number}","events_url":"https://api.github.com/repos/FLIF-hub/FLIF/events","assignees_url":"https://api.github.com/repos/FLIF-hub/FLIF/assignees{/user}","branches_url":"https://api.github.com/repos/FLIF-hub/FLIF/branches{/branch}","tags_url":"https://api.github.com/repos/FLIF-hub/FLIF/tags","blobs_url":"https://api.github.com/repos/FLIF-hub/FLIF/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FLIF-hub/FLIF/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FLIF-hub/FLIF/git/refs{/sha}","trees_url":"https://api.github.com/repos/FLIF-hub/FLIF/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FLIF-hub/FLIF/statuses/{sha}","languages_url":"https://api.github.com/repos/FLIF-hub/FLIF/languages","stargazers_url":"https://api.github.com/repos/FLIF-hub/FLIF/stargazers","contributors_url":"https://api.github.com/repos/FLIF-hub/FLIF/contributors","subscribers_url":"https://api.github.com/repos/FLIF-hub/FLIF/subscribers","subscription_url":"https://api.github.com/repos/FLIF-hub/FLIF/subscription","commits_url":"https://api.github.com/repos/FLIF-hub/FLIF/commits{/sha}","git_commits_url":"https://api.github.com/repos/FLIF-hub/FLIF/git/commits{/sha}","comments_url":"https://api.github.com/repos/FLIF-hub/FLIF/comments{/number}","issue_comment_url":"https://api.github.com/repos/FLIF-hub/FLIF/issues/comments{/number}","contents_url":"https://api.github.com/repos/FLIF-hub/FLIF/contents/{+path}","compare_url":"https://api.github.com/repos/FLIF-hub/FLIF/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FLIF-hub/FLIF/merges","archive_url":"https://api.github.com/repos/FLIF-hub/FLIF/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FLIF-hub/FLIF/downloads","issues_url":"https://api.github.com/repos/FLIF-hub/FLIF/issues{/number}","pulls_url":"https://api.github.com/repos/FLIF-hub/FLIF/pulls{/number}","milestones_url":"https://api.github.com/repos/FLIF-hub/FLIF/milestones{/number}","notifications_url":"https://api.github.com/repos/FLIF-hub/FLIF/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FLIF-hub/FLIF/labels{/name}","releases_url":"https://api.github.com/repos/FLIF-hub/FLIF/releases{/id}","created_at":"2015-09-07T12:04:24Z","updated_at":"2015-10-21T17:58:09Z","pushed_at":"2015-10-21T22:14:15Z","git_url":"git://github.com/FLIF-hub/FLIF.git","ssh_url":"git@github.com:FLIF-hub/FLIF.git","clone_url":"https://github.com/FLIF-hub/FLIF.git","svn_url":"https://github.com/FLIF-hub/FLIF","homepage":null,"size":18069,"stargazers_count":1852,"watchers_count":1852,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":99,"mirror_url":null,"open_issues_count":25,"forks":99,"open_issues":25,"watchers":1852,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FLIF-hub/FLIF/pulls/110"},"html":{"href":"https://github.com/FLIF-hub/FLIF/pull/110"},"issue":{"href":"https://api.github.com/repos/FLIF-hub/FLIF/issues/110"},"comments":{"href":"https://api.github.com/repos/FLIF-hub/FLIF/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/FLIF-hub/FLIF/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/FLIF-hub/FLIF/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FLIF-hub/FLIF/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/FLIF-hub/FLIF/statuses/80938d104e7fc8856e74b9dee778a47f5b251882"}}}}