Improved performance of str/array buffer conversions

This commit is contained in:
n1474335 2023-02-03 17:10:33 +00:00
parent 7a2517fd61
commit 659325c85a
8 changed files with 30 additions and 23 deletions

View file

@ -49,7 +49,7 @@ class ParseIPv4Header extends Operation {
if (format === "Hex") {
input = fromHex(input);
} else if (format === "Raw") {
input = Utils.strToByteArray(input);
input = new Uint8Array(Utils.strToArrayBuffer(input));
} else {
throw new OperationError("Unrecognised input format.");
}