{"action":"created","issue":{"url":"https://api.github.com/repos/lemire/FastIntegerCompression.js/issues/1","repository_url":"https://api.github.com/repos/lemire/FastIntegerCompression.js","labels_url":"https://api.github.com/repos/lemire/FastIntegerCompression.js/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/lemire/FastIntegerCompression.js/issues/1/comments","events_url":"https://api.github.com/repos/lemire/FastIntegerCompression.js/issues/1/events","html_url":"https://github.com/lemire/FastIntegerCompression.js/issues/1","id":175738224,"number":1,"title":"Same as code points?","user":{"login":"wshager","id":660912,"avatar_url":"https://avatars.githubusercontent.com/u/660912?v=3","gravatar_id":"","url":"https://api.github.com/users/wshager","html_url":"https://github.com/wshager","followers_url":"https://api.github.com/users/wshager/followers","following_url":"https://api.github.com/users/wshager/following{/other_user}","gists_url":"https://api.github.com/users/wshager/gists{/gist_id}","starred_url":"https://api.github.com/users/wshager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wshager/subscriptions","organizations_url":"https://api.github.com/users/wshager/orgs","repos_url":"https://api.github.com/users/wshager/repos","events_url":"https://api.github.com/users/wshager/events{/privacy}","received_events_url":"https://api.github.com/users/wshager/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-09-08T12:15:21Z","updated_at":"2016-09-10T16:31:19Z","closed_at":"2016-09-08T12:20:03Z","body":"I'm surprised that the output buffer of a compressed code-point array has the same byte size as the uncompressed string. I assume that means that if I encode an array of integers as a UTF-8 string it would result in the same size. \r\n\r\n\r\n```javascript\r\nfunction lengthInUtf8Bytes(str) {\r\n  var m = encodeURIComponent(str).match(/%[89ABab]/g);\r\n  return str.length + (m ? m.length : 0);\r\n}\r\nFastIntCompression.compress(str.split(\"\").map(_ => _.codePointAt(0))).byteLength == lengthInUtf8Bytes(str)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/lemire/FastIntegerCompression.js/issues/comments/246121247","html_url":"https://github.com/lemire/FastIntegerCompression.js/issues/1#issuecomment-246121247","issue_url":"https://api.github.com/repos/lemire/FastIntegerCompression.js/issues/1","id":246121247,"user":{"login":"lemire","id":391987,"avatar_url":"https://avatars.githubusercontent.com/u/391987?v=3","gravatar_id":"","url":"https://api.github.com/users/lemire","html_url":"https://github.com/lemire","followers_url":"https://api.github.com/users/lemire/followers","following_url":"https://api.github.com/users/lemire/following{/other_user}","gists_url":"https://api.github.com/users/lemire/gists{/gist_id}","starred_url":"https://api.github.com/users/lemire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lemire/subscriptions","organizations_url":"https://api.github.com/users/lemire/orgs","repos_url":"https://api.github.com/users/lemire/repos","events_url":"https://api.github.com/users/lemire/events{/privacy}","received_events_url":"https://api.github.com/users/lemire/received_events","type":"User","site_admin":false},"created_at":"2016-09-10T16:31:19Z","updated_at":"2016-09-10T16:31:19Z","body":"In which context would you do `Buffer.from(String.fromCodePoint.apply(null,array))`?"}}
{"actor":{"display_login":"lemire"}}