You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Pavel Tupitsyn (JIRA)" <ji...@apache.org> on 2017/08/02 09:06:00 UTC
[jira] [Created] (IGNITE-5904) .NET: Improve array access in
IBinaryReader and IBinaryRawReader
Pavel Tupitsyn created IGNITE-5904:
--------------------------------------
Summary: .NET: Improve array access in IBinaryReader and IBinaryRawReader
Key: IGNITE-5904
URL: https://issues.apache.org/jira/browse/IGNITE-5904
Project: Ignite
Issue Type: Improvement
Components: platforms
Reporter: Pavel Tupitsyn
Currently the only way to work with array fields is reading them entirely into a new instance:
{code}
byte[] ReadByteArray();
{code}
This does not allow reusing existing array (array pooling) or reading only a part of the data (random access).
Many .NET APIs provide an approach where existing array is used with index and offset ({{Array.Copy}}, {{Socket.Receive}}, etc).
We can do a similar thing for *arrays of fixed-size elements*:
{code}
int ReadByteArray(byte[] dest, int destOffset, int srcOffset, int count);
{code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)