Skip to content

Commit

Permalink
remove dependency to SplitDataWriter
Browse files Browse the repository at this point in the history
  • Loading branch information
gildas-lormeau committed Feb 6, 2024
1 parent 9b78616 commit f89a0e4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/core/zip-writer.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ import {
import {
initStream,
initReader,
initWriter,
SplitDataWriter
initWriter
} from "./io.js";
import { encodeText } from "./util/encode-text.js";
import {
Expand Down Expand Up @@ -109,9 +108,12 @@ class ZipWriter {

constructor(writer, options = {}) {
writer = initWriter(writer);
const addSplitZipSignature =
writer.availableSize !== UNDEFINED_VALUE && writer.availableSize > 0 && writer.availableSize !== Infinity &&
writer.maxSize !== UNDEFINED_VALUE && writer.maxSize > 0 && writer.maxSize !== Infinity;
Object.assign(this, {
writer,
addSplitZipSignature: writer instanceof SplitDataWriter,
addSplitZipSignature,
options,
config: getConfiguration(),
files: new Map(),
Expand Down

0 comments on commit f89a0e4

Please sign in to comment.