[#1] Add object Get operation + code quality
Signed-off-by: Ivan Pchelintsev <i.pchelintsev@yadro.com>
This commit is contained in:
parent
9aa93d123d
commit
b307c2c899
17 changed files with 182 additions and 99 deletions
|
@ -7,12 +7,11 @@ namespace FrostFS.SDK.Cryptography
|
|||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static byte[] Concat(params byte[][] buffers)
|
||||
{
|
||||
int length = 0;
|
||||
for (int i = 0; i < buffers.Length; i++)
|
||||
length += buffers[i].Length;
|
||||
byte[] dst = new byte[length];
|
||||
int p = 0;
|
||||
foreach (byte[] src in buffers)
|
||||
var length = buffers.Sum(buffer => buffer.Length);
|
||||
|
||||
var dst = new byte[length];
|
||||
var p = 0;
|
||||
foreach (var src in buffers)
|
||||
{
|
||||
Buffer.BlockCopy(src, 0, dst, p, src.Length);
|
||||
p += src.Length;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue