GZipFile.Decompress
-------------------

Decompresses a file.

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

MBS( "GZipFile.Decompress"; InputPath; OutputPath ) 

**MBS**( **"GZipFile.Decompress";** /\* Decompresses a file. \*/  
**$InputPath**; /\* The native path to the input file.e.g. "C:\\test.gz" \*/   
**$OutputPath**) /\* The native path to the input file.e.g. "C:\\test.txt" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| InputPath | The native path to the input file. | "C:\\test.gz" |
| OutputPath | The native path to the input file. | "C:\\test.txt" |

### Result

Returns OK or error.

### Description

Decompresses a file.  
This function uses gzip file format, so please use file extension .gz.   
As this function processes file in chunks it should work fine with huge files.  
In case of an error like a full hard disk, you need to manually delete the half written output file.  
  
This function requires a native path. Use [Path.FileMakerPathToNativePath](PathFileMakerPathToNativePath.md) to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use [FileDialog](component_FileDialog.md) functions.  
For Server be aware that server has limited permissions and may not be able to access all files on a computer.  
### Examples

Uncompress a file:

 MBS ( "GZipFile.Decompress"; "C:\\test.gz"; "C:\\test.txt" )  
### See also

- [GZipFile.Compress](GZipFileCompress.md)
- [Path.FileMakerPathToNativePath](PathFileMakerPathToNativePath.md)

### Blog Entries

- [Comparing Base Elements Plugin to MBS FileMaker Plugin](https://www.mbsplugins.de/archive/2017-10-24/Comparing_Base_Elements_Plugin/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 5th September 2014

  
[GZipFile.Compress](GZipFileCompress.md) - [GameKit.Achievement.Completed](GameKitAchievementCompleted.md)

[HTML Version](GZipFileDecompress.shtml)