Added 'LZString Decompress' and 'LZString Compress' operations

This commit is contained in:
Peter Jacobs 2021-10-29 01:31:55 -05:00
parent ae1b12c120
commit 671ae6558f
8 changed files with 184 additions and 10 deletions

View file

@ -107,6 +107,7 @@ import "./tests/CBORDecode.mjs";
import "./tests/JA3Fingerprint.mjs";
import "./tests/JA3SFingerprint.mjs";
import "./tests/HASSH.mjs";
import "./tests/LZString.mjs";
// Cannot test operations that use the File type yet

View file

@ -0,0 +1,33 @@
/**
* LZString tests.
*
* @author crespyl [peter@crespyl.net]
* @copyright Peter Jacobs 2021
* @license Apache-2.0
*/
import TestRegister from "../../lib/TestRegister.mjs";
TestRegister.addTests([
{
name: "LZString Compress To Base64",
input: "hello world",
expectedOutput: "BYUwNmD2AEDukCcwBMg=",
recipeConfig: [
{
"op": "LZString Compress",
"args": ["Base64"]
}
],
},
{
name: "LZString Decompress From Base64",
input: "BYUwNmD2AEDukCcwBMg=",
expectedOutput: "hello world",
recipeConfig: [
{
"op": "LZString Decompress",
"args": ["Base64"]
}
],
}
]);