# new ZipWriter (pathToZipoptstring)

Arguments:

Methods

# add (zipNamestring, datastring) instance

Add string or binary data into archive as zipName

Arguments:

# addFile (filePathstring, zipNameoptstring) instance

Add file content into archive

Arguments:
  • filePath: string

    Path to file to add

  • zipName: string

    zip entry name. Can be a relative path 'folder/file.txt'. If not specified, fileName(filePath) is used

# addZipEntry (readerZipReader, indexnumber) instance

Copy compressed zip entry from reader archive into this archive (without recompression)

Arguments:
  • reader: ZipReader

    instance of reader

  • index: number

    file index inside reader archive

# getAsArrayBuffer () → ArrayBuffer instance

If archive is in-memory (pathToZip is empty in constructor call) - return zipped content