We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05365b4 commit 0ec9816Copy full SHA for 0ec9816
1 file changed
Lagrange.Core/Utility/Compression/ZCompression.cs
@@ -1,4 +1,5 @@
1
-using System.Text;
+using System.Buffers.Binary;
2
+using System.Text;
3
4
namespace Lagrange.Core.Utility.Compression;
5
@@ -40,6 +41,8 @@ private static byte[] Adler32(byte[] data)
40
41
a = (a + t) % 65521;
42
b = (b + a) % 65521;
43
}
- return BitConverter.GetBytes(b | a << 16);
44
+ var result = new byte[4];
45
+ BinaryPrimitives.WriteUInt32BigEndian(result, (b << 16) | a);
46
+ return result;
47
48
0 commit comments