import { Writer } from "https://deno.land/x/zipjs@v2.6.13/index.js";
Represents a Writer
instance used to write any type of data.
Example: Custom Writer class used to write binary strings.
class BinaryStringWriter extends Writer {
constructor() {
super();
this.binaryString = "";
}
writeUint8Array(array) {
super.writeUint8Array(array);
for (let indexCharacter = 0; indexCharacter < array.length; indexCharacter++) {
this.binaryString += String.fromCharCode(array[indexCharacter]);
}
}
getData() {
return this.binaryString;
}
}