Container.Decompress
--------------------

Decompresses a container value.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Container](component_Container.md) | [5.3](newinversion53.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Container.Decompress"; ContainerValue ) 

**MBS**( **"Container.Decompress";** /\* Decompresses a container value. \*/  
**$ContainerValue**) /\* The container value to decompress. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| ContainerValue | The container value to decompress. |  |

### Result

Returns container value or error.

### Description

Decompresses a container value.  
If you pass a compressed container value, this function will decompress it and return the container value with uncompressed data.  
  
Compressed containers can be detected by looking if the type list returned by [Container.GetTypes](ContainerGetTypes.md) contains an item named ZLIB. You can use [Container.GetTypeSize](ContainerGetTypeSize.md) to query the size of compressed data alone.  
  
Does not work with FileMaker's compressed plugins in a container.  
### Examples

Decompress container:

 Set Field \[Container Compression::Decompressed ; MBS ("Container.Decompress"; Container Compression::Compressed )\]  
Decode hex encoded zlib compressed PDF in a text field:

 Set Field \[ PDF::PDFFile ; MBS ( "Container.Decompress"; MBS ( "[Container.RenameStream](ContainerRenameStream.md)"; MBS ( "[Container.DecodeFromHex](ContainerDecodeFromHex.md)"; "FILE"; PDF::PDF\_hex ; "test.pdf"); "FILE"; "ZLIB" )) \]  
### See also

- [Container.Compress](ContainerCompress.md)
- [Container.DecodeFromHex](ContainerDecodeFromHex.md)
- [Container.GetType](ContainerGetType.md)
- [Container.GetTypes](ContainerGetTypes.md)
- [Container.GetTypeSize](ContainerGetTypeSize.md)
- [Container.IsCompressed](ContainerIsCompressed.md)
- [Container.Rename](ContainerRename.md)
- [Container.RenameStream](ContainerRenameStream.md)

### Release notes

- **Version 14.1**
    - Fixed a problem in [Container.Decompress](https://www.mbsplugins.eu/ContainerDecompress.shtml) function.
- **Version 9.1**
    - Rewrote [Container.Compress](http://www.mbsplugins.eu/ContainerCompress.shtml) and [Container.Decompress](http://www.mbsplugins.eu/ContainerDecompress.shtml) to work faster.

### Example Databases

- [Containers/Container Compression](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Containers/Container%20Compression.shtml#2ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 14.1pr1](https://www.mbsplugins.de/archive/2024-02-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 9.1pr1](https://www.mbsplugins.de/archive/2019-02-06/MBS_FileMaker_Plugin_version_9/monkeybreadsoftware_blog_filemaker)
- [Comparing Base Elements Plugin to MBS FileMaker Plugin](https://www.mbsplugins.de/archive/2017-10-24/Comparing_Base_Elements_Plugin/monkeybreadsoftware_blog_filemaker)
- [\[ANN\] MBS FileMaker Plugin 5.3 for OS X/Windows](https://www.mbsplugins.de/archive/2015-10-01/[ANN]_MBS_FileMaker_Plugin_53_/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 5.3pr4](https://www.mbsplugins.de/archive/2015-09-22/MBS_FileMaker_Plugin_version_5/monkeybreadsoftware_blog_filemaker)
- [Compressed Containers](https://www.mbsplugins.de/archive/2015-09-16/Compressed_Containers/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 15th September 2015 , last changed 1st May 2022

  
[Container.DecodeFromHex](ContainerDecodeFromHex.md) - [Container.Deserialize](ContainerDeserialize.md)

[HTML Version](ContainerDecompress.shtml)