Function toRawDataDiff
Compares two arrays of raw byte data and produces a detailed comparison report.
string toRawDataDiff
(
const(void[]) va,
const(void[]) vb,
string namea = "DATA A:\n",
string nameb = "DATA B:\n",
string header = "START OF DIFF\n"
);
The function generates a hex dump for each byte array, followed by a diff of the two arrays, highlighting the differences. This is useful for debugging and verifying binary data, such as audio files, image files, or any other binary data format.
Parameters
Name | Description |
---|---|
va | The first byte array to compare. |
vb | The second byte array to compare. |
namea | A label for the first byte array (default: "DATA A:"). |
nameb | A label for the second byte array (default: "DATA B:"). |
header | A custom header for the comparison output (default: "START OF DIFF"). |
Returns
A string containing the detailed comparison report, including the hex dumps and the diff.