deps: Replace compressjs by seek-bzip (#349)

* Replace compressjs by seek-bzip

* Update CHANGELOG
This commit is contained in:
CosminPerRam 2023-09-09 11:33:02 +03:00 committed by GitHub
parent ff5f6ef2e2
commit ca7f56c996
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 69 deletions

View file

@ -1,4 +1,4 @@
const Bzip2 = require('compressjs').Bzip2;
const Bzip2 = require('seek-bzip');
const Core = require('./core');
const Results = require('../lib/Results');
const Reader = require('../lib/reader');
@ -592,7 +592,7 @@ class Valve extends Core {
if(bzip) {
this.debugLog("BZIP DETECTED - Extracing packet...");
try {
assembled = Buffer.from(Bzip2.decompressFile(assembled));
assembled = Bzip2.decode(assembled);
} catch(e) {
throw new Error('Invalid bzip packet');
}