public static unsafe byte[] CloneBytes(byte *b, long start, long PostEnd) { var result = new byte[PostEnd - start]; fixed(byte *r = result) BytesBuilder.CopyTo(PostEnd, PostEnd - start, b, r, 0, -1, start); return(result); }
public void add(byte[] bytesToAdded, int index = -1, bool isNoConstant = false) { if (isNoConstant) { var b = new byte[bytesToAdded.LongLength]; BytesBuilder.CopyTo(bytesToAdded, b); bytesToAdded = b; } if (index == -1) { bytes.Add(bytesToAdded); } else { bytes.Insert((int)index, bytesToAdded); } count += bytesToAdded.LongLength; }