method
zlib.ZipEntry.content
): Promise<NonSharedBuffer>;
Throws an ERR_ZIP_ENTRY_TOO_LARGE error if the entry's declared size exceeds maxSize, an ERR_ZIP_ENTRY_CORRUPT error if the content fails CRC-32 verification or does not match its declared size, and an ERR_INVALID_STATE error for a streaming entry (zlib.ZipEntry.createStream()) whose content is not yet available (see that method for when a streaming entry becomes readable).
@returns
Promise fulfilled with a Buffer containing the entry's decompressed content. The buffer is a fresh copy that shares no memory with the archive or with data the entry was created from.
Referenced types
interface ZipEntryContentOptions
- maxSize?: number
Reject content declaring more than this many uncompressed bytes, before allocating anything.