initial work on "unroller" (decrypt wtv encrypted pcap)

This commit is contained in:
zefie
2025-07-17 21:45:58 -04:00
parent dc99128a12
commit 8123158a8c
4 changed files with 165 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
const WTVLzpf = require("./includes/classes/WTVLzpf.js")
const lzpf = new WTVLzpf();
// Test with a simple string
const testString = "This is a test string to compress and decompress";
const compressed = lzpf.Compress(testString);
const decompressed = lzpf.Decompress(compressed);
console.log("Original:", testString);
console.log("Decompressed:", decompressed.toString());
console.log("Match:", testString === decompressed.toString());
// Test with HTML-like data (which LZPF was optimized for)
const htmlString = "<html><body><h1>Test</h1><p>This is a paragraph.</p></body></html>";
const compressedHtml = lzpf.Compress(htmlString);
const decompressedHtml = lzpf.Decompress(compressedHtml);
console.log("HTML match:", htmlString === decompressedHtml.toString());