class provide compression library
let archive = new ZipArchive();
archive.compressionLevel = 'Normal';
let archiveItem = new ZipArchiveItem(archive, 'directoryName\fileName.txt');
archive.addItem(archiveItem);
archive.save(fileName.zip);
CompressionLevel
gets compression level
number
gets items count
add new directory to archive
Parameter | Type | Description |
---|---|---|
directoryName | string |
directoryName to be created |
Returns void
add new item to archive
Parameter | Type | Description |
---|---|---|
item | ZipArchiveItem |
item to be added |
Returns void
determines whether an element is in the collection
Parameter | Type | Description |
---|---|---|
item | string | ZipArchiveItem |
item to search |
Returns boolean
release allocated un-managed resource
Returns void
gets item at specified index
Parameter | Type | Description |
---|---|---|
index | number |
item index |
Returns ZipArchiveItem
save archive with specified file name
Parameter | Type | Description |
---|---|---|
fileName | string |
save archive with specified file name |
Returns Promise
Save archive as blob
Returns Promise