Class BinaryUtils
Utils for binary operations.
Inheritance
System.Object
BinaryUtils
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: LLBML.Math
Assembly: LLBModdingLib.dll
Syntax
public static class BinaryUtils
Methods
ByteArraysEqual(Byte[], Byte[])
Determines whether a specified instance of byte[] is equal to another specified byte[].
Declaration
public static bool ByteArraysEqual(byte[] b1, byte[] b2)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | b1 | The first byte[] to compare. |
| System.Byte[] | b2 | The second byte[] to compare. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
XORFold(Byte[], Int32)
Takes both half of a byte[] and apply a XOR operation between them, resulting in a half length array.
Declaration
public static byte[] XORFold(byte[] input, int times = 1)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | input | The array to fold. |
| System.Int32 | times | The number of times to fold the array. |
Returns
| Type | Description |
|---|---|
| System.Byte[] | The resulting folded byte[]. |
Exceptions
| Type | Condition |
|---|---|
| System.NotImplementedException | Will throw for arrays that are not of lenght that is a power of 2 |