gildas-lormeau / zip.js

JavaScript library to zip and unzip files supporting multi-core compression, compression streams, zip64, split files and encryption.
https://gildas-lormeau.github.io/zip.js
BSD 3-Clause "New" or "Revised" License
3.38k stars 510 forks source link

Naming scheme #398

Closed sugoidesune closed 1 year ago

sugoidesune commented 1 year ago

Yo who came up with using a reader for writing files inside a writer

await zipWriter.add("hello.txt", helloWorldReader);

and a writer for reading files coming from a reader:

const firstEntry = (await zipReader.getEntries()).shift();
const helloWorldText = await firstEntry.getData(helloWorldWriter);

Whichever way you think about it atleast keep it consistent! Put readers into readers and writers into writers.

await zipWriter.add("hello.txt", helloWorldWriter);
gildas-lormeau commented 1 year ago

Thank you for your future contributions.