byte[] MergeHeaderAndBody(byte[] header, byte[] body) { byte[] output = new byte[body.Length + header.Length]; Buffer.BlockCopy(header, 0, output, 0, header.Length); Buffer.BlockCopy(body, 0, output, header.Length, body.Length); return output; }