[feat] new pngchunk encode/decoderr
This commit is contained in:
@@ -1195,7 +1195,7 @@ export class LocalWriter{
|
||||
this.writer = writableStream.getWriter()
|
||||
return true
|
||||
}
|
||||
async write(name:string,data: Uint8Array){
|
||||
async writeBackup(name:string,data: Uint8Array){
|
||||
const encodedName = new TextEncoder().encode(getBasename(name))
|
||||
const nameLength = new Uint32Array([encodedName.byteLength])
|
||||
await this.writer.write(new Uint8Array(nameLength.buffer))
|
||||
@@ -1204,6 +1204,9 @@ export class LocalWriter{
|
||||
await this.writer.write(new Uint8Array(dataLength.buffer))
|
||||
await this.writer.write(data)
|
||||
}
|
||||
async write(data:Uint8Array) {
|
||||
await this.writer.write(data)
|
||||
}
|
||||
async close(){
|
||||
await this.writer.close()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user