UnZipFile.ItemFlag
------------------

Queries the flags for this item.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Compression](component_Compression.md) | [3.4](newinversion34.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "UnZipFile.ItemFlag"; Index ) 

**MBS**( **"UnZipFile.ItemFlag";** /\* Queries the flags for this item. \*/  
**$Index**) /\* Index of the item from 0 to [UnZipFile.ItemCount](UnZipFileItemCount.md)-1. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Index | Index of the item from 0 to [UnZipFile.ItemCount](UnZipFileItemCount.md)-1. | $index |

### Result

Returns number or error.

### Description

Queries the flags for this item.  
The flag is a bit field with various values.  
Last bit of the flag is encryption state: value is 1 (odd) for encrypted and 0 (even) for unencrypted value.  
The bit values 2 and 4 define compression level between 0 to 9.  
  
| Flag Value | Encryption | Compression Level |
|---|---|---|
| 0 | no | 6 |
| 1 | yes | 6 |
| 2 | no | 9 |
| 3 | yes | 9 |
| 4 | no | 2 |
| 5 | yes | 2 |
| 6 | no | 1 |
| 7 | yes | 1 |

### Examples

Check compressed state:

 Set Variable \[$compressed ; Value: MBS ( "[Math.BitwiseAND](MathBitwiseAND.md)"; MBS ( "UnZipFile.ItemFlag"; Index ); 1 ) = 1 \]  
### See also

- [Math.BitwiseAND](MathBitwiseAND.md)
- [UnZipFile.ItemCount](UnZipFileItemCount.md)
- [UnZipFile.ItemCRC](UnZipFileItemCRC.md)
- [UnZipFile.ItemDate](UnZipFileItemDate.md)
- [UnZipFile.ItemName](UnZipFileItemName.md)

### Example Databases

- [Archives/Show Zip File Content](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Archives/Show%20Zip%20File%20Content.shtml#3ScriptAnchor_)

This function checks for a license.

Created 18th August 2014 , last changed 31st August 2017

  
[UnZipFile.ItemExternalFileAttributes](UnZipFileItemExternalFileAttributes.md) - [UnZipFile.ItemInternalFileAttributes](UnZipFileItemInternalFileAttributes.md)

[HTML Version](UnZipFileItemFlag.shtml)