BililiveRecorder/BililiveRecorder.FlvProcessor/Utils.cs
Genteure c54301ba68 ~
2018-03-24 02:27:58 +08:00

23 lines
510 B
C#

using System;
using System.Linq;
namespace BililiveRecorder.FlvProcessor
{
internal static class Utils
{
/// <summary>
/// 转换字节序。实际上通常是把 BE 转成 LE
/// </summary>
/// <param name="b"></param>
/// <returns></returns>
internal static byte[] ToBE(this byte[] b)
{
if (BitConverter.IsLittleEndian)
return b.Reverse().ToArray();
else
return b;
}
}
}