{"action":"created","comment":{"url":"https://api.github.com/repos/schovi/baked_file_system/pulls/comments/69979504","id":69979504,"diff_hunk":"@@ -11,28 +12,44 @@ module BakedFileSystem\n     getter! mime_type : String\n     getter! size : Int32\n     getter! encoded : String\n+    getter! compressed_size : Int32\n \n     @slice   : Slice(UInt8)?\n-    @string  : String?\n+    @io  : IO?\n \n-    def initialize(@path, @mime_type, @size, @encoded)\n+    def initialize(@path, @mime_type, @size, @compressed_size, @encoded)\n       @name = File.basename(path)\n     end\n \n-    def read","path":"src/baked_file_system.cr","position":21,"original_position":21,"commit_id":"70be8e87f932eb3c35aaf89b814a4ea0f9f3ded9","original_commit_id":"70be8e87f932eb3c35aaf89b814a4ea0f9f3ded9","user":{"login":"schovi","id":11453,"avatar_url":"https://avatars.githubusercontent.com/u/11453?v=3","gravatar_id":"","url":"https://api.github.com/users/schovi","html_url":"https://github.com/schovi","followers_url":"https://api.github.com/users/schovi/followers","following_url":"https://api.github.com/users/schovi/following{/other_user}","gists_url":"https://api.github.com/users/schovi/gists{/gist_id}","starred_url":"https://api.github.com/users/schovi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schovi/subscriptions","organizations_url":"https://api.github.com/users/schovi/orgs","repos_url":"https://api.github.com/users/schovi/repos","events_url":"https://api.github.com/users/schovi/events{/privacy}","received_events_url":"https://api.github.com/users/schovi/received_events","type":"User","site_admin":false},"body":"Is there any reason, why you removed `BakedFile.read`? My intention for that was to have similar behaviour as `File.read(...)`","created_at":"2016-07-07T20:23:23Z","updated_at":"2016-07-07T20:23:23Z","html_url":"https://github.com/schovi/baked_file_system/pull/3#discussion_r69979504","pull_request_url":"https://api.github.com/repos/schovi/baked_file_system/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/schovi/baked_file_system/pulls/comments/69979504"},"html":{"href":"https://github.com/schovi/baked_file_system/pull/3#discussion_r69979504"},"pull_request":{"href":"https://api.github.com/repos/schovi/baked_file_system/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/schovi/baked_file_system/pulls/3","id":76635644,"html_url":"https://github.com/schovi/baked_file_system/pull/3","diff_url":"https://github.com/schovi/baked_file_system/pull/3.diff","patch_url":"https://github.com/schovi/baked_file_system/pull/3.patch","issue_url":"https://api.github.com/repos/schovi/baked_file_system/issues/3","number":3,"state":"open","locked":false,"title":"Compress all files","user":{"login":"mperham","id":2911,"avatar_url":"https://avatars.githubusercontent.com/u/2911?v=3","gravatar_id":"","url":"https://api.github.com/users/mperham","html_url":"https://github.com/mperham","followers_url":"https://api.github.com/users/mperham/followers","following_url":"https://api.github.com/users/mperham/following{/other_user}","gists_url":"https://api.github.com/users/mperham/gists{/gist_id}","starred_url":"https://api.github.com/users/mperham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mperham/subscriptions","organizations_url":"https://api.github.com/users/mperham/orgs","repos_url":"https://api.github.com/users/mperham/repos","events_url":"https://api.github.com/users/mperham/events{/privacy}","received_events_url":"https://api.github.com/users/mperham/received_events","type":"User","site_admin":false},"body":"This PR gzip compresses all files before storing them into the binary.  It also adds APIs so the file contents can be accessed both compressed or uncompressed, allowing for efficient serving of assets to browsers which accept gzip (which is 99% of them).\r\n\r\nIn my view, the 80% use case of this shard is for storing compressible web assets (e.g. JS, CSS) where compression gives a huge win in size.  The test suite contains a PNG that I crushed with `pngcrush` and it **still** compressed another 10% with gzip.  In other words, I don't believe it's worth it to support disabling compression for certain filetypes.\r\n\r\nFixes #2","created_at":"2016-07-07T17:37:36Z","updated_at":"2016-07-07T20:23:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e520472026268218bf8404af2d84ea4f0addfbec","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/schovi/baked_file_system/pulls/3/commits","review_comments_url":"https://api.github.com/repos/schovi/baked_file_system/pulls/3/comments","review_comment_url":"https://api.github.com/repos/schovi/baked_file_system/pulls/comments{/number}","comments_url":"https://api.github.com/repos/schovi/baked_file_system/issues/3/comments","statuses_url":"https://api.github.com/repos/schovi/baked_file_system/statuses/70be8e87f932eb3c35aaf89b814a4ea0f9f3ded9","head":{"label":"mperham:master","ref":"master","sha":"70be8e87f932eb3c35aaf89b814a4ea0f9f3ded9","user":{"login":"mperham","id":2911,"avatar_url":"https://avatars.githubusercontent.com/u/2911?v=3","gravatar_id":"","url":"https://api.github.com/users/mperham","html_url":"https://github.com/mperham","followers_url":"https://api.github.com/users/mperham/followers","following_url":"https://api.github.com/users/mperham/following{/other_user}","gists_url":"https://api.github.com/users/mperham/gists{/gist_id}","starred_url":"https://api.github.com/users/mperham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mperham/subscriptions","organizations_url":"https://api.github.com/users/mperham/orgs","repos_url":"https://api.github.com/users/mperham/repos","events_url":"https://api.github.com/users/mperham/events{/privacy}","received_events_url":"https://api.github.com/users/mperham/received_events","type":"User","site_admin":false},"repo":{"id":62825854,"name":"baked_file_system","full_name":"mperham/baked_file_system","owner":{"login":"mperham","id":2911,"avatar_url":"https://avatars.githubusercontent.com/u/2911?v=3","gravatar_id":"","url":"https://api.github.com/users/mperham","html_url":"https://github.com/mperham","followers_url":"https://api.github.com/users/mperham/followers","following_url":"https://api.github.com/users/mperham/following{/other_user}","gists_url":"https://api.github.com/users/mperham/gists{/gist_id}","starred_url":"https://api.github.com/users/mperham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mperham/subscriptions","organizations_url":"https://api.github.com/users/mperham/orgs","repos_url":"https://api.github.com/users/mperham/repos","events_url":"https://api.github.com/users/mperham/events{/privacy}","received_events_url":"https://api.github.com/users/mperham/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mperham/baked_file_system","description":"Virtual File System for Crystal language","fork":true,"url":"https://api.github.com/repos/mperham/baked_file_system","forks_url":"https://api.github.com/repos/mperham/baked_file_system/forks","keys_url":"https://api.github.com/repos/mperham/baked_file_system/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mperham/baked_file_system/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mperham/baked_file_system/teams","hooks_url":"https://api.github.com/repos/mperham/baked_file_system/hooks","issue_events_url":"https://api.github.com/repos/mperham/baked_file_system/issues/events{/number}","events_url":"https://api.github.com/repos/mperham/baked_file_system/events","assignees_url":"https://api.github.com/repos/mperham/baked_file_system/assignees{/user}","branches_url":"https://api.github.com/repos/mperham/baked_file_system/branches{/branch}","tags_url":"https://api.github.com/repos/mperham/baked_file_system/tags","blobs_url":"https://api.github.com/repos/mperham/baked_file_system/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mperham/baked_file_system/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mperham/baked_file_system/git/refs{/sha}","trees_url":"https://api.github.com/repos/mperham/baked_file_system/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mperham/baked_file_system/statuses/{sha}","languages_url":"https://api.github.com/repos/mperham/baked_file_system/languages","stargazers_url":"https://api.github.com/repos/mperham/baked_file_system/stargazers","contributors_url":"https://api.github.com/repos/mperham/baked_file_system/contributors","subscribers_url":"https://api.github.com/repos/mperham/baked_file_system/subscribers","subscription_url":"https://api.github.com/repos/mperham/baked_file_system/subscription","commits_url":"https://api.github.com/repos/mperham/baked_file_system/commits{/sha}","git_commits_url":"https://api.github.com/repos/mperham/baked_file_system/git/commits{/sha}","comments_url":"https://api.github.com/repos/mperham/baked_file_system/comments{/number}","issue_comment_url":"https://api.github.com/repos/mperham/baked_file_system/issues/comments{/number}","contents_url":"https://api.github.com/repos/mperham/baked_file_system/contents/{+path}","compare_url":"https://api.github.com/repos/mperham/baked_file_system/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mperham/baked_file_system/merges","archive_url":"https://api.github.com/repos/mperham/baked_file_system/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mperham/baked_file_system/downloads","issues_url":"https://api.github.com/repos/mperham/baked_file_system/issues{/number}","pulls_url":"https://api.github.com/repos/mperham/baked_file_system/pulls{/number}","milestones_url":"https://api.github.com/repos/mperham/baked_file_system/milestones{/number}","notifications_url":"https://api.github.com/repos/mperham/baked_file_system/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mperham/baked_file_system/labels{/name}","releases_url":"https://api.github.com/repos/mperham/baked_file_system/releases{/id}","deployments_url":"https://api.github.com/repos/mperham/baked_file_system/deployments","created_at":"2016-07-07T17:30:19Z","updated_at":"2016-07-07T17:30:23Z","pushed_at":"2016-07-07T17:32:26Z","git_url":"git://github.com/mperham/baked_file_system.git","ssh_url":"git@github.com:mperham/baked_file_system.git","clone_url":"https://github.com/mperham/baked_file_system.git","svn_url":"https://github.com/mperham/baked_file_system","homepage":null,"size":72,"stargazers_count":0,"watchers_count":0,"language":"Crystal","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":"schovi:master","ref":"master","sha":"f423fb21518df39c34f2550915745b3445708dca","user":{"login":"schovi","id":11453,"avatar_url":"https://avatars.githubusercontent.com/u/11453?v=3","gravatar_id":"","url":"https://api.github.com/users/schovi","html_url":"https://github.com/schovi","followers_url":"https://api.github.com/users/schovi/followers","following_url":"https://api.github.com/users/schovi/following{/other_user}","gists_url":"https://api.github.com/users/schovi/gists{/gist_id}","starred_url":"https://api.github.com/users/schovi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schovi/subscriptions","organizations_url":"https://api.github.com/users/schovi/orgs","repos_url":"https://api.github.com/users/schovi/repos","events_url":"https://api.github.com/users/schovi/events{/privacy}","received_events_url":"https://api.github.com/users/schovi/received_events","type":"User","site_admin":false},"repo":{"id":61886108,"name":"baked_file_system","full_name":"schovi/baked_file_system","owner":{"login":"schovi","id":11453,"avatar_url":"https://avatars.githubusercontent.com/u/11453?v=3","gravatar_id":"","url":"https://api.github.com/users/schovi","html_url":"https://github.com/schovi","followers_url":"https://api.github.com/users/schovi/followers","following_url":"https://api.github.com/users/schovi/following{/other_user}","gists_url":"https://api.github.com/users/schovi/gists{/gist_id}","starred_url":"https://api.github.com/users/schovi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schovi/subscriptions","organizations_url":"https://api.github.com/users/schovi/orgs","repos_url":"https://api.github.com/users/schovi/repos","events_url":"https://api.github.com/users/schovi/events{/privacy}","received_events_url":"https://api.github.com/users/schovi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/schovi/baked_file_system","description":"Virtual File System for Crystal language","fork":false,"url":"https://api.github.com/repos/schovi/baked_file_system","forks_url":"https://api.github.com/repos/schovi/baked_file_system/forks","keys_url":"https://api.github.com/repos/schovi/baked_file_system/keys{/key_id}","collaborators_url":"https://api.github.com/repos/schovi/baked_file_system/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/schovi/baked_file_system/teams","hooks_url":"https://api.github.com/repos/schovi/baked_file_system/hooks","issue_events_url":"https://api.github.com/repos/schovi/baked_file_system/issues/events{/number}","events_url":"https://api.github.com/repos/schovi/baked_file_system/events","assignees_url":"https://api.github.com/repos/schovi/baked_file_system/assignees{/user}","branches_url":"https://api.github.com/repos/schovi/baked_file_system/branches{/branch}","tags_url":"https://api.github.com/repos/schovi/baked_file_system/tags","blobs_url":"https://api.github.com/repos/schovi/baked_file_system/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/schovi/baked_file_system/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/schovi/baked_file_system/git/refs{/sha}","trees_url":"https://api.github.com/repos/schovi/baked_file_system/git/trees{/sha}","statuses_url":"https://api.github.com/repos/schovi/baked_file_system/statuses/{sha}","languages_url":"https://api.github.com/repos/schovi/baked_file_system/languages","stargazers_url":"https://api.github.com/repos/schovi/baked_file_system/stargazers","contributors_url":"https://api.github.com/repos/schovi/baked_file_system/contributors","subscribers_url":"https://api.github.com/repos/schovi/baked_file_system/subscribers","subscription_url":"https://api.github.com/repos/schovi/baked_file_system/subscription","commits_url":"https://api.github.com/repos/schovi/baked_file_system/commits{/sha}","git_commits_url":"https://api.github.com/repos/schovi/baked_file_system/git/commits{/sha}","comments_url":"https://api.github.com/repos/schovi/baked_file_system/comments{/number}","issue_comment_url":"https://api.github.com/repos/schovi/baked_file_system/issues/comments{/number}","contents_url":"https://api.github.com/repos/schovi/baked_file_system/contents/{+path}","compare_url":"https://api.github.com/repos/schovi/baked_file_system/compare/{base}...{head}","merges_url":"https://api.github.com/repos/schovi/baked_file_system/merges","archive_url":"https://api.github.com/repos/schovi/baked_file_system/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/schovi/baked_file_system/downloads","issues_url":"https://api.github.com/repos/schovi/baked_file_system/issues{/number}","pulls_url":"https://api.github.com/repos/schovi/baked_file_system/pulls{/number}","milestones_url":"https://api.github.com/repos/schovi/baked_file_system/milestones{/number}","notifications_url":"https://api.github.com/repos/schovi/baked_file_system/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/schovi/baked_file_system/labels{/name}","releases_url":"https://api.github.com/repos/schovi/baked_file_system/releases{/id}","deployments_url":"https://api.github.com/repos/schovi/baked_file_system/deployments","created_at":"2016-06-24T13:22:51Z","updated_at":"2016-07-07T18:43:35Z","pushed_at":"2016-07-07T17:37:37Z","git_url":"git://github.com/schovi/baked_file_system.git","ssh_url":"git@github.com:schovi/baked_file_system.git","clone_url":"https://github.com/schovi/baked_file_system.git","svn_url":"https://github.com/schovi/baked_file_system","homepage":null,"size":29,"stargazers_count":7,"watchers_count":7,"language":"Crystal","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/schovi/baked_file_system/pulls/3"},"html":{"href":"https://github.com/schovi/baked_file_system/pull/3"},"issue":{"href":"https://api.github.com/repos/schovi/baked_file_system/issues/3"},"comments":{"href":"https://api.github.com/repos/schovi/baked_file_system/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/schovi/baked_file_system/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/schovi/baked_file_system/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/schovi/baked_file_system/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/schovi/baked_file_system/statuses/70be8e87f932eb3c35aaf89b814a4ea0f9f3ded9"}}}}
{"actor":{"display_login":"schovi"}}