mirror of
https://github.com/gchq/CyberChef
synced 2025-12-10 21:33:36 +00:00
Updated a range of operations to use ArrayBuffers instead of byteArrays to improve performance with large files.
This commit is contained in:
@@ -16,14 +16,14 @@ class Protobuf {
|
||||
/**
|
||||
* Protobuf constructor
|
||||
*
|
||||
* @param {byteArray} data
|
||||
* @param {byteArray|Uint8Array} data
|
||||
*/
|
||||
constructor(data) {
|
||||
// Check we have a byteArray
|
||||
if (data instanceof Array) {
|
||||
// Check we have a byteArray or Uint8Array
|
||||
if (data instanceof Array || data instanceof Uint8Array) {
|
||||
this.data = data;
|
||||
} else {
|
||||
throw new Error("Protobuf input must be a byteArray");
|
||||
throw new Error("Protobuf input must be a byteArray or Uint8Array");
|
||||
}
|
||||
|
||||
// Set up masks
|
||||
|
||||
Reference in New Issue
Block a user