From c9becc4b9e17d77b84cb6c6b704706ff0bddb5e2 Mon Sep 17 00:00:00 2001 From: 101arrowz Date: Tue, 8 Feb 2022 12:35:55 -0800 Subject: [PATCH] Fix README mistake --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8507145..3a59694 100644 --- a/README.md +++ b/README.md @@ -474,13 +474,15 @@ const zip = new Zip(); zip.ondata = (err, chunk, final) => { ... }; // The JSON and BMP are compressed in parallel const exampleFile = new AsyncZipDeflate('example.json'); +zip.add(exampleFile); exampleFile.push(JSON.stringify({ large: 'object' }), true); const exampleFile2 = new AsyncZipDeflate('example2.bmp', { level: 9 }); -exampleFile.push(ec2a); -exampleFile.push(ec2b); -exampleFile.push(ec2c); +zip.add(exampleFile2); +exampleFile2.push(ec2a); +exampleFile2.push(ec2b); +exampleFile2.push(ec2c); ... -exampleFile.push(ec2Final, true); +exampleFile2.push(ec2Final, true); zip.end(); // Streaming Unzip should register the asynchronous inflation algorithm