Creates the Uint8ArrayWriter instance
OptionaldefaultBufferSize: number
The initial size of the internal buffer (default: 256KB).
The number of bytes written into the instance.
The WritableStream instance.
Retrieves all the written data
The written data, or a promise resolving to it.
OptionalinitInitializes the instance, synchronously or asynchronously
Optionalsize: number
the total size of the written data in bytes.
Appends a chunk of data, synchronously or asynchronously
The chunk data to append.
Represents a Writer instance used to retrieve the written data as a
Uint8Arrayinstance.Remarks
When reading an entry, the buffer is allocated upfront from the declared EntryMetaData#uncompressedSize, capped at 1032 times EntryMetaData#compressedSize (the maximum expansion ratio of deflate). The declared size is not verified before the allocation, so check it against the limit your application accepts when the zip file comes from an untrusted source.