{"action":"closed","issue":{"url":"https://api.github.com/repos/neuecc/MessagePack-CSharp/issues/210","repository_url":"https://api.github.com/repos/neuecc/MessagePack-CSharp","labels_url":"https://api.github.com/repos/neuecc/MessagePack-CSharp/issues/210/labels{/name}","comments_url":"https://api.github.com/repos/neuecc/MessagePack-CSharp/issues/210/comments","events_url":"https://api.github.com/repos/neuecc/MessagePack-CSharp/issues/210/events","html_url":"https://github.com/neuecc/MessagePack-CSharp/issues/210","id":298651953,"number":210,"title":"Deserializer requires too much data","user":{"login":"antrv","id":1135617,"avatar_url":"https://avatars3.githubusercontent.com/u/1135617?v=4","gravatar_id":"","url":"https://api.github.com/users/antrv","html_url":"https://github.com/antrv","followers_url":"https://api.github.com/users/antrv/followers","following_url":"https://api.github.com/users/antrv/following{/other_user}","gists_url":"https://api.github.com/users/antrv/gists{/gist_id}","starred_url":"https://api.github.com/users/antrv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antrv/subscriptions","organizations_url":"https://api.github.com/users/antrv/orgs","repos_url":"https://api.github.com/users/antrv/repos","events_url":"https://api.github.com/users/antrv/events{/privacy}","received_events_url":"https://api.github.com/users/antrv/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-20T16:08:16Z","updated_at":"2018-02-20T16:17:55Z","closed_at":"2018-02-20T16:17:55Z","author_association":"NONE","body":"I serialize an object directly into NetworkStream and on another socket side I try to deserialize this object from NetworkStream.\r\n\r\nThe serialized object size is 4 bytes. When I call MessagePackSerializer.Deserialize<T>(_stream) it calls _stream.Read method 2 times. \r\nIn the first time it calls _stream.Read(buffer, 0, 65535) and this call returns 4 bytes,\r\nin the second time it calls _stream.Read(buffer, 0, 65531) and the application hangs because there is no more data in the stream.\r\n\r\nI think that deserializer requires more data that it needs to deserialize the object. \r\n\r\nIs there any possibility to change the deserializer behavior in this case without involving any additional byte arrays and data copying? Or some fixes need to be made in the library?\r\n"}}
{"actor":{"display_login":"antrv"}}