replace Array.Copy with Buffer.BlockCopy for better performance