{"action":"created","issue":{"url":"https://api.github.com/repos/pieroxy/lz-string/issues/98","repository_url":"https://api.github.com/repos/pieroxy/lz-string","labels_url":"https://api.github.com/repos/pieroxy/lz-string/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/pieroxy/lz-string/issues/98/comments","events_url":"https://api.github.com/repos/pieroxy/lz-string/issues/98/events","html_url":"https://github.com/pieroxy/lz-string/pull/98","id":238638125,"number":98,"title":"A cornucopia of optimisations","user":{"login":"JobLeonard","id":259840,"avatar_url":"https://avatars3.githubusercontent.com/u/259840?v=4","gravatar_id":"","url":"https://api.github.com/users/JobLeonard","html_url":"https://github.com/JobLeonard","followers_url":"https://api.github.com/users/JobLeonard/followers","following_url":"https://api.github.com/users/JobLeonard/following{/other_user}","gists_url":"https://api.github.com/users/JobLeonard/gists{/gist_id}","starred_url":"https://api.github.com/users/JobLeonard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JobLeonard/subscriptions","organizations_url":"https://api.github.com/users/JobLeonard/orgs","repos_url":"https://api.github.com/users/JobLeonard/repos","events_url":"https://api.github.com/users/JobLeonard/events{/privacy}","received_events_url":"https://api.github.com/users/JobLeonard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":36,"created_at":"2017-06-26T19:00:50Z","updated_at":"2017-09-22T09:45:31Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/pieroxy/lz-string/pulls/98","html_url":"https://github.com/pieroxy/lz-string/pull/98","diff_url":"https://github.com/pieroxy/lz-string/pull/98.diff","patch_url":"https://github.com/pieroxy/lz-string/pull/98.patch"},"body":"This combines various suggestions from @Rycochet and @lishid and myself. See #88 and #97.\r\n\r\n- replace string-based `keyStr.charAt(i)` with array-based `keyStr[i]`\r\n- add `compressToArray` and `decompressFromArray` functions, and use them throughout the code to avoid intermediate string creation:\r\n  - `compressToBase64` avoids appending to string\r\n  - `compressToUint8Array` avoids an intermediate string\r\n  - `decompressFromUint8Array` avoids an intermediate string\r\n\r\nSimilar optimisations have been applied to `base64-string.js`, but it doesn't have tests so I can't say for sure if it's bug-free."},"comment":{"url":"https://api.github.com/repos/pieroxy/lz-string/issues/comments/331402343","html_url":"https://github.com/pieroxy/lz-string/pull/98#issuecomment-331402343","issue_url":"https://api.github.com/repos/pieroxy/lz-string/issues/98","id":331402343,"user":{"login":"JobLeonard","id":259840,"avatar_url":"https://avatars3.githubusercontent.com/u/259840?v=4","gravatar_id":"","url":"https://api.github.com/users/JobLeonard","html_url":"https://github.com/JobLeonard","followers_url":"https://api.github.com/users/JobLeonard/followers","following_url":"https://api.github.com/users/JobLeonard/following{/other_user}","gists_url":"https://api.github.com/users/JobLeonard/gists{/gist_id}","starred_url":"https://api.github.com/users/JobLeonard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JobLeonard/subscriptions","organizations_url":"https://api.github.com/users/JobLeonard/orgs","repos_url":"https://api.github.com/users/JobLeonard/repos","events_url":"https://api.github.com/users/JobLeonard/events{/privacy}","received_events_url":"https://api.github.com/users/JobLeonard/received_events","type":"User","site_admin":false},"created_at":"2017-09-22T09:45:31Z","updated_at":"2017-09-22T09:45:31Z","author_association":"NONE","body":"Maybe a release candidate-type approach before merging it? I _really_ don't want to risk breaking anything in production! I mean, look at these stats:\r\n\r\n> 2,014 downloads in the last day\r\n> 10,353 downloads in the last week\r\n> 43,481 downloads in the last month\r\n\r\nhttps://www.npmjs.com/package/lz-string\r\n\r\nThat's quite a lot of packages I might break with these code changes..."}}
{"actor":{"display_login":"JobLeonard"}}