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

# new TubZipReader (fromString)

Arguments:
  • from: String| TubBuffer

    fileName or TubBuffer object to read zip archive from

Members

# fileCount : number instance

Read only file count inside archive

# fileNames : Array instance

Read only array of file names inside archive

Methods

# unZipAllToDir (dirNameString) → Boolean instance

Unzip all files to specified folder.

Return:

Success

Arguments:
  • dirName: String

    directory name to unzip files to

# unZipToBuffer (fileIndexNumber, destTubBuffer) → number instance

Unzip specified file and append to existed TubBuffer.

Return:

Unzipped bytes count

Arguments:
  • fileIndex: Number

    index of file to unzip

  • dest: TubBuffer

    buffer to append unzipped data

# unZipToDir (fileIndexNumber, dirNameString) → Boolean instance

Unzip specified file to specified folder.

Return:

Success

Arguments:
  • fileIndex: Number

    index of file to unzip

  • dirName: String

    directory name to unzip file to