diff --git a/PixelHub-Server/PixelHub/SBRL.Utilities/Utilities.cs b/PixelHub-Server/PixelHub/SBRL.Utilities/Utilities.cs index 0d7d117..66c93d6 100644 --- a/PixelHub-Server/PixelHub/SBRL.Utilities/Utilities.cs +++ b/PixelHub-Server/PixelHub/SBRL.Utilities/Utilities.cs @@ -32,6 +32,20 @@ namespace SBRL.Utilities ["\n"] = @"\n", ["\t"] = @"\t" }; + + /// + /// Concatenates a pair of buffers into a single long buffer. + /// + /// The first buffer to concatenate. + /// The second buffer to concatenate. + /// The concatenated buffers. + public static byte[] ConcatBuffers(byte[] A, byte[] B) + { + byte[] result = new byte[A.Length + B.Length]; + Buffer.BlockCopy(A, 0, result, 0, A.Length); + Buffer.BlockCopy(B, 0, result, A.Length, B.Length); + return result; + } } }