{"action":"created","comment":{"url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/comments/29762502","id":29762502,"diff_hunk":"@@ -723,16 +728,30 @@ class jlib_decl CFastLZCompressor : public CInterface, public ICompressor\n \n     size32_t write(const void *buf,size32_t len)\n     {\n-        if (len+inlen>inmax) {\n-            if (trailing)\n-                return 0;\n-            flushcommitted();\n-            if (len+inlen>inmax) \n-                len = inmax-inlen;\n+        // no more than wrmax per write\n+        size32_t lenb = wrmax;\n+        byte *b = (byte *)buf;\n+        size32_t written = 0;\n+        while (len)\n+        {\n+            if (len < lenb)\n+                lenb = len;\n+            if (lenb+inlen>inmax) {\n+                if (trailing)\n+                    return written;\n+                flushcommitted();","path":"system/jlib/jflz.cpp","position":60,"original_position":60,"commit_id":"0810f744c83afbe097adff99b9eb619995498aec","original_commit_id":"0810f744c83afbe097adff99b9eb619995498aec","user":{"login":"mckellyln","id":5116200,"avatar_url":"https://avatars.githubusercontent.com/u/5116200?v=3","gravatar_id":"","url":"https://api.github.com/users/mckellyln","html_url":"https://github.com/mckellyln","followers_url":"https://api.github.com/users/mckellyln/followers","following_url":"https://api.github.com/users/mckellyln/following{/other_user}","gists_url":"https://api.github.com/users/mckellyln/gists{/gist_id}","starred_url":"https://api.github.com/users/mckellyln/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mckellyln/subscriptions","organizations_url":"https://api.github.com/users/mckellyln/orgs","repos_url":"https://api.github.com/users/mckellyln/repos","events_url":"https://api.github.com/users/mckellyln/events{/privacy}","received_events_url":"https://api.github.com/users/mckellyln/received_events","type":"User","site_admin":false},"body":"Yes, that is a good optimization.  I will work on that soon.","created_at":"2015-05-06T14:23:10Z","updated_at":"2015-05-06T14:23:10Z","html_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/7275#discussion_r29762502","pull_request_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7275","_links":{"self":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/comments/29762502"},"html":{"href":"https://github.com/hpcc-systems/HPCC-Platform/pull/7275#discussion_r29762502"},"pull_request":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7275"}}},"pull_request":{"url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7275","id":34674469,"html_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/7275","diff_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/7275.diff","patch_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/7275.patch","issue_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/7275","number":7275,"state":"open","locked":false,"title":"HPCC-13477 FLZ compressor fixes (2) for when input buffer > internal buffer","user":{"login":"mckellyln","id":5116200,"avatar_url":"https://avatars.githubusercontent.com/u/5116200?v=3","gravatar_id":"","url":"https://api.github.com/users/mckellyln","html_url":"https://github.com/mckellyln","followers_url":"https://api.github.com/users/mckellyln/followers","following_url":"https://api.github.com/users/mckellyln/following{/other_user}","gists_url":"https://api.github.com/users/mckellyln/gists{/gist_id}","starred_url":"https://api.github.com/users/mckellyln/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mckellyln/subscriptions","organizations_url":"https://api.github.com/users/mckellyln/orgs","repos_url":"https://api.github.com/users/mckellyln/repos","events_url":"https://api.github.com/users/mckellyln/events{/privacy}","received_events_url":"https://api.github.com/users/mckellyln/received_events","type":"User","site_admin":false},"body":"This fix is also linked with HPCC-13491 and should address both issues.\r\n1). Compressor write() needs to handle when buffer is larger than internal buffer.\r\n2). If compressed output is same size as input then do not save compressed data.\r\n\r\nSigned-off-by: Mark Kelly <mark.kelly@lexisnexis.com>\r\n\r\n@jakesmith please review","created_at":"2015-05-04T20:57:37Z","updated_at":"2015-05-06T14:23:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9d47461c41bcfd60660fdc93ad5f5e577be6ca8a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7275/commits","review_comments_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7275/comments","review_comment_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/7275/comments","statuses_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/statuses/0810f744c83afbe097adff99b9eb619995498aec","head":{"label":"mckellyln:13477a","ref":"13477a","sha":"0810f744c83afbe097adff99b9eb619995498aec","user":{"login":"mckellyln","id":5116200,"avatar_url":"https://avatars.githubusercontent.com/u/5116200?v=3","gravatar_id":"","url":"https://api.github.com/users/mckellyln","html_url":"https://github.com/mckellyln","followers_url":"https://api.github.com/users/mckellyln/followers","following_url":"https://api.github.com/users/mckellyln/following{/other_user}","gists_url":"https://api.github.com/users/mckellyln/gists{/gist_id}","starred_url":"https://api.github.com/users/mckellyln/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mckellyln/subscriptions","organizations_url":"https://api.github.com/users/mckellyln/orgs","repos_url":"https://api.github.com/users/mckellyln/repos","events_url":"https://api.github.com/users/mckellyln/events{/privacy}","received_events_url":"https://api.github.com/users/mckellyln/received_events","type":"User","site_admin":false},"repo":{"id":12089496,"name":"HPCC-Platform","full_name":"mckellyln/HPCC-Platform","owner":{"login":"mckellyln","id":5116200,"avatar_url":"https://avatars.githubusercontent.com/u/5116200?v=3","gravatar_id":"","url":"https://api.github.com/users/mckellyln","html_url":"https://github.com/mckellyln","followers_url":"https://api.github.com/users/mckellyln/followers","following_url":"https://api.github.com/users/mckellyln/following{/other_user}","gists_url":"https://api.github.com/users/mckellyln/gists{/gist_id}","starred_url":"https://api.github.com/users/mckellyln/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mckellyln/subscriptions","organizations_url":"https://api.github.com/users/mckellyln/orgs","repos_url":"https://api.github.com/users/mckellyln/repos","events_url":"https://api.github.com/users/mckellyln/events{/privacy}","received_events_url":"https://api.github.com/users/mckellyln/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mckellyln/HPCC-Platform","description":"IMPORTANT - Issue tracking has been migrated to JIRA - use your github ID and password reset mechanism to log in","fork":true,"url":"https://api.github.com/repos/mckellyln/HPCC-Platform","forks_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/forks","keys_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/teams","hooks_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/hooks","issue_events_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/issues/events{/number}","events_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/events","assignees_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/assignees{/user}","branches_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/branches{/branch}","tags_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/tags","blobs_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/statuses/{sha}","languages_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/languages","stargazers_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/stargazers","contributors_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/contributors","subscribers_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/subscribers","subscription_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/subscription","commits_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/contents/{+path}","compare_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/merges","archive_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/downloads","issues_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/issues{/number}","pulls_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/pulls{/number}","milestones_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/milestones{/number}","notifications_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/labels{/name}","releases_url":"https://api.github.com/repos/mckellyln/HPCC-Platform/releases{/id}","created_at":"2013-08-13T18:39:30Z","updated_at":"2015-05-04T20:24:06Z","pushed_at":"2015-05-06T12:14:05Z","git_url":"git://github.com/mckellyln/HPCC-Platform.git","ssh_url":"git@github.com:mckellyln/HPCC-Platform.git","clone_url":"https://github.com/mckellyln/HPCC-Platform.git","svn_url":"https://github.com/mckellyln/HPCC-Platform","homepage":"track.hpccsystems.com","size":143477,"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":"hpcc-systems:candidate-5.2.4","ref":"candidate-5.2.4","sha":"a7e6d8738f201b44d5a3bbc12741f7b2be69ff54","user":{"login":"hpcc-systems","id":900867,"avatar_url":"https://avatars.githubusercontent.com/u/900867?v=3","gravatar_id":"","url":"https://api.github.com/users/hpcc-systems","html_url":"https://github.com/hpcc-systems","followers_url":"https://api.github.com/users/hpcc-systems/followers","following_url":"https://api.github.com/users/hpcc-systems/following{/other_user}","gists_url":"https://api.github.com/users/hpcc-systems/gists{/gist_id}","starred_url":"https://api.github.com/users/hpcc-systems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpcc-systems/subscriptions","organizations_url":"https://api.github.com/users/hpcc-systems/orgs","repos_url":"https://api.github.com/users/hpcc-systems/repos","events_url":"https://api.github.com/users/hpcc-systems/events{/privacy}","received_events_url":"https://api.github.com/users/hpcc-systems/received_events","type":"Organization","site_admin":false},"repo":{"id":2030681,"name":"HPCC-Platform","full_name":"hpcc-systems/HPCC-Platform","owner":{"login":"hpcc-systems","id":900867,"avatar_url":"https://avatars.githubusercontent.com/u/900867?v=3","gravatar_id":"","url":"https://api.github.com/users/hpcc-systems","html_url":"https://github.com/hpcc-systems","followers_url":"https://api.github.com/users/hpcc-systems/followers","following_url":"https://api.github.com/users/hpcc-systems/following{/other_user}","gists_url":"https://api.github.com/users/hpcc-systems/gists{/gist_id}","starred_url":"https://api.github.com/users/hpcc-systems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpcc-systems/subscriptions","organizations_url":"https://api.github.com/users/hpcc-systems/orgs","repos_url":"https://api.github.com/users/hpcc-systems/repos","events_url":"https://api.github.com/users/hpcc-systems/events{/privacy}","received_events_url":"https://api.github.com/users/hpcc-systems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hpcc-systems/HPCC-Platform","description":"IMPORTANT - Issue tracking has been migrated to JIRA - use your github ID and password reset mechanism to log in","fork":false,"url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform","forks_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/forks","keys_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/teams","hooks_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/hooks","issue_events_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/events{/number}","events_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/events","assignees_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/assignees{/user}","branches_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/branches{/branch}","tags_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/tags","blobs_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/statuses/{sha}","languages_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/languages","stargazers_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/stargazers","contributors_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/contributors","subscribers_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/subscribers","subscription_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/subscription","commits_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/contents/{+path}","compare_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/merges","archive_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/downloads","issues_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues{/number}","pulls_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls{/number}","milestones_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/milestones{/number}","notifications_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/labels{/name}","releases_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/releases{/id}","created_at":"2011-07-11T14:29:51Z","updated_at":"2015-05-05T09:20:23Z","pushed_at":"2015-05-06T14:22:14Z","git_url":"git://github.com/hpcc-systems/HPCC-Platform.git","ssh_url":"git@github.com:hpcc-systems/HPCC-Platform.git","clone_url":"https://github.com/hpcc-systems/HPCC-Platform.git","svn_url":"https://github.com/hpcc-systems/HPCC-Platform","homepage":"track.hpccsystems.com","size":335386,"stargazers_count":248,"watchers_count":248,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":107,"mirror_url":null,"open_issues_count":424,"forks":107,"open_issues":424,"watchers":248,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7275"},"html":{"href":"https://github.com/hpcc-systems/HPCC-Platform/pull/7275"},"issue":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/7275"},"comments":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/7275/comments"},"review_comments":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7275/comments"},"review_comment":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7275/commits"},"statuses":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/statuses/0810f744c83afbe097adff99b9eb619995498aec"}}}}