Skip to content

Commit

Permalink
add it to the correct class so it actually does something
Browse files Browse the repository at this point in the history
  • Loading branch information
KurtThiemann committed Apr 10, 2024
1 parent 8e3bcb1 commit e6e7c08
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "armarius-io",
"version": "1.2.1",
"version": "1.2.2",
"description": "IO and compression library for Armarius",
"repository": "github:aternosorg/armarius-io",
"type": "module",
Expand Down
10 changes: 10 additions & 0 deletions src/DataProcessor/Fflate/FflateDeflateDataProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,15 @@ export default class FflateDeflateDataProcessor extends FflateDataProcessor {
this.flate = new Deflate();
this.flate.ondata = this.onData.bind(this);
}

/**
* @inheritDoc
*/
push(data, final) {
super.push(data, final);
if (!final) {
this.flate.flush();
}
}
}

9 changes: 0 additions & 9 deletions src/DataProcessor/Native/NativeDeflateDataProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,4 @@ export default class NativeDeflateDataProcessor extends NativeStreamDataProcesso
// noinspection JSUnresolvedFunction
return new CompressionStream('deflate-raw');
}

/**
* @inheritDoc
*/
push(data, final) {
if (!final) {
this.flate.flush();
}
}
}

0 comments on commit e6e7c08

Please sign in to comment.