mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 15:26:16 -04:00
Sets the gzip comment bitfield
This commit is contained in:
parent
928178716a
commit
3a1a6a94d2
2 changed files with 16 additions and 10 deletions
|
@ -5,9 +5,11 @@
|
|||
*/
|
||||
|
||||
import Operation from "../Operation.mjs";
|
||||
import zlibAndGzip from "zlibjs/bin/zlib_and_gzip.min.js";
|
||||
// import zlibAndGzip from "zlibjs/bin/zlib_and_gzip.min.js";
|
||||
import gunzip from "zlibjs/bin/gunzip.min.js";
|
||||
|
||||
const Zlib = zlibAndGzip.Zlib;
|
||||
// const Zlib = zlibAndGzip.Zlib;
|
||||
const Zlib = gunzip.Zlib;
|
||||
|
||||
/**
|
||||
* Gunzip operation
|
||||
|
@ -42,8 +44,8 @@ class Gunzip extends Operation {
|
|||
* @returns {File}
|
||||
*/
|
||||
run(input, args) {
|
||||
const gunzip = new Zlib.Gunzip(new Uint8Array(input));
|
||||
return new Uint8Array(gunzip.decompress()).buffer;
|
||||
const gzipObj = new Zlib.Gunzip(new Uint8Array(input));
|
||||
return new Uint8Array(gzipObj.decompress()).buffer;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue