{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/zstd/issues/1320","repository_url":"https://api.github.com/repos/facebook/zstd","labels_url":"https://api.github.com/repos/facebook/zstd/issues/1320/labels{/name}","comments_url":"https://api.github.com/repos/facebook/zstd/issues/1320/comments","events_url":"https://api.github.com/repos/facebook/zstd/issues/1320/events","html_url":"https://github.com/facebook/zstd/issues/1320","id":360604697,"node_id":"MDU6SXNzdWUzNjA2MDQ2OTc=","number":1320,"title":"[QUESTION] ZSTD_compressStream() returns dstSize_tooSmall","user":{"login":"xndai","id":2403293,"node_id":"MDQ6VXNlcjI0MDMyOTM=","avatar_url":"https://avatars2.githubusercontent.com/u/2403293?v=4","gravatar_id":"","url":"https://api.github.com/users/xndai","html_url":"https://github.com/xndai","followers_url":"https://api.github.com/users/xndai/followers","following_url":"https://api.github.com/users/xndai/following{/other_user}","gists_url":"https://api.github.com/users/xndai/gists{/gist_id}","starred_url":"https://api.github.com/users/xndai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xndai/subscriptions","organizations_url":"https://api.github.com/users/xndai/orgs","repos_url":"https://api.github.com/users/xndai/repos","events_url":"https://api.github.com/users/xndai/events{/privacy}","received_events_url":"https://api.github.com/users/xndai/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-16T05:22:11Z","updated_at":"2018-09-16T07:53:50Z","closed_at":null,"author_association":"NONE","body":"Hi all, \r\n\r\nWhen will ZSTD_compressStream() returns dstSize_tooSmall? Is there any requirement on the minimum length of output buffer? There is a function ZSTD_CStreamOutSize() to get recommended output size, is that the minimum length required?\r\n\r\nI am having an intermittent dstSize_tooSmall error in our setup. The output buffer size varies each time we call  ZSTD_compressStream() due to our implementation. I am trying to understand what could be the issue.\r\n\r\nThanks!\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/zstd/issues/comments/421718873","html_url":"https://github.com/facebook/zstd/issues/1320#issuecomment-421718873","issue_url":"https://api.github.com/repos/facebook/zstd/issues/1320","id":421718873,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTcxODg3Mw==","user":{"login":"Cyan4973","id":750081,"node_id":"MDQ6VXNlcjc1MDA4MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/750081?v=4","gravatar_id":"","url":"https://api.github.com/users/Cyan4973","html_url":"https://github.com/Cyan4973","followers_url":"https://api.github.com/users/Cyan4973/followers","following_url":"https://api.github.com/users/Cyan4973/following{/other_user}","gists_url":"https://api.github.com/users/Cyan4973/gists{/gist_id}","starred_url":"https://api.github.com/users/Cyan4973/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cyan4973/subscriptions","organizations_url":"https://api.github.com/users/Cyan4973/orgs","repos_url":"https://api.github.com/users/Cyan4973/repos","events_url":"https://api.github.com/users/Cyan4973/events{/privacy}","received_events_url":"https://api.github.com/users/Cyan4973/received_events","type":"User","site_admin":false},"created_at":"2018-09-16T07:53:50Z","updated_at":"2018-09-16T07:53:50Z","author_association":"CONTRIBUTOR","body":"Hi @xndai ,\r\n\r\nif I understand your question correctly, this should not happen.\r\n`ZSTD_compressStream()` is supposed to size its internal buffers correctly, and will use its internal buffer instead of provided `dst` output buffer whenever it believes there is not enough room in `dst` to complete operation safely.\r\n\r\nWhich version of `libzstd` are you using ?\r\n\r\nIf you have a reproducible error case, I would like to analyze it."}}
{"actor":{"display_login":"Cyan4973"}}