## Zip(filename, mode, compressionopt)

Constructor

#### # new Zip(filename, mode, compressionopt)

Open a ZIP, for file modes see ZIPFILE.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`filename` | string |  | the name of the file.
`mode` | FILE |  | READ, WRITE or APPEND.
`compression` | number | <optional> | 1..9 to specify compression level.

# Methods

#### # AddFile(zip_name, hdd_name)

add a file to a ZIP.

##### Parameters:

Name | Type | Description
--- | --- | ---
`zip_name` | string | the full path the file shall have in the ZIP.
`hdd_name` | string | the full path to the file to add.

#### # Close()

close ZIP.

#### # ExtractFile(zip_name, hdd_name)

extract a file from a ZIP.

##### Parameters:

Name | Type | Description
--- | --- | ---
`zip_name` | string | the full path of the file in the ZIP.
`hdd_name` | string | the full path the extracted file should have on the HDD.

#### # GetEntries() → {*}

get an array with the file entries in the ZIP.

Returns:
an array containing the file entries of the ZIP in the following format:
Type: *

##### Example

    [
         [name:string, is_directory:bool, size:number, crc32:number],
         ...
    ]

#### # NumEntries() → {number}

get number of entries in ZIP.

Returns:
number of entries in this ZIP.
Type: number

#### # ReadBytes(zip_name) → {Array.<number>}

get file contents as number array.

##### Parameters:

Name | Type | Description
--- | --- | ---
`zip_name` | string | the full path of the file in the ZIP.

Returns:
the content of the file as array of numbers.
Type: Array.<number>