OpenStory.Common.Arrays.FastJoinList C# (CSharp) Method

FastJoinList() private static method

private static FastJoinList ( IList arrays ) : byte[]
arrays IList
return byte[]
        private static byte[] FastJoinList(IList<byte[]> arrays)
        {
            var totalLength = arrays.Sum(s => s.Length);
            var buffer = new byte[totalLength];

            int offset = 0;
            foreach (var array in arrays)
            {
                var count = array.Length;
                Buffer.BlockCopy(array, 0, buffer, offset, count);
                offset += count;
            }

            return buffer;
        }