TubZipReader

TubZipReader

TubZipReader Class for read zip archives. Can read from file name or from TubBuffer

Constructor

new TubZipReader(from)

Arguments:
  1. from (String|TubBuffer)  fileName or TubBuffer object to read zip archive from

Members

fileNames: Array

Read only array of file names inside archive

fileCount: number

Read only file count inside archive

Methods

unZipToBuffer(fileIndex, dest)number

Unzip specified file and append to existed TubBuffer.
Arguments:
  1. fileIndex (Number)  index of file to unzip
  2. dest (TubBuffer)  buffer to append unzipped data

unZipToDir(fileIndex, dirName)Boolean

Unzip specified file to specified folder.
Arguments:
  1. fileIndex (Number)  index of file to unzip
  2. dirName (String)  directory name to unzip file to

unZipAllToDir(dirName)Boolean

Unzip all files to specified folder.
Arguments:
  1. dirName (String)  directory name to unzip files to