Azure Function: Zip File

Azure Function: Zip File

Unfortunately, there are no out-of-the-box capabilities inside Logic Apps, Consumption or Standard, to zip (or compress) files. You may be wondering why we need this type of capability. Well, there are legacy systems or integrations that require these capabilities, especially when the communication channel is email.

And yes, still happens today! It is not uncommon that some partners require that messages (or files) be sent by email, and to minimize the impact (to avoid reaching the attachment size limit or filling the mailbox), to zip the attachment.

This is also very useful to migrate AS IS BizTalk Server solutions into Azure (in this case, AS-IS means without changing the solution requirements).

And what does this Azure Function do?

The ZipFile Azure Function is simply an Azure Function that zips an inbound file. This can later be sent in an attachment of an email, sent to a folder or storage account.

Where can I download it?

You can download the complete Azure Functions source code here:

Hope you find this helpful! So, if you liked the content or found it useful and want to help me write more, you can buy (or help me buy) my son a Star Wars Lego! 

Thanks to my team member Luís Rigueira for helping me realize and implement this idea.

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc.

He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.
View all posts by Sandro Pereira

BizTalk Server 2020 – 20 days, 20 posts: Zip File Pipeline Component for BizTalk Server 2020

BizTalk Server 2020 – 20 days, 20 posts: Zip File Pipeline Component for BizTalk Server 2020

BizTalk Server 2020 – 20 days, 20 posts – day 11. Following my recent blog posts here is another pipeline component migrate to BizTalk Server 2020 that makes part of my BizTalk Pipeline Components Extensions UtilityPack project: Zip File Pipeline Component.

Zip File Pipeline Component

The Zip File Pipeline Component is a pipeline component for BizTalk Server which can be used in a send pipeline (encode stage) and is intended to compress (zip/gzip) outgoing messages.

  • The capabilities are similar to those available in compression software such as WinZip or 7-zip.
  • No compression/decompression software needs to be installed in the BizTalk Server machines.
Zip File Pipeline Component for BizTalk Server 2020

To use this pipeline component in your projects you just copy the BizTalk.PipelineComponents.ZipFile.dll file into the Pipeline Components folder that exists in BizTalk Server Installation directory: “..Program Files (x86)Microsoft BizTalk ServerPipeline Components” on every server.

You do not need to add a custom pipeline component to be used by the BizTalk Runtime to the Global Assembly Cache (GAC).

This component requires two configurations that are:

  • the FileExtension: where you can specify if you want for example a .zip or .gz file.
  • and Enabled: that is a true or false value to activate the compression.

What is BizTalk Pipeline Components Extensions Utility Pack?

BizTalk Pipeline Components Extensions Utility Pack is a set of custom pipeline components (libraries) with several custom pipeline components that can be used in received and sent pipelines, which will provide an extension of BizTalk out-of-the-box pipeline capabilities.

The project is available on the BizTalk Server Open Source Community repository on GitHub (https://github.com/BizTalkCommunity), and everyone can contribute with new pipeline components that can be extended or improve the existing BizTalk Server capabilities.

BizTalk Pipeline Components Extensions Utility Pack: Zip File Pipeline Component for BizTalk Server 2020

At the moment this project is available for:

  • BizTalk Server 2020;
  • BizTalk Server 2016;
  • BizTalk Server 2010;
  • BizTalk Server 2006-2009

Where to download it?

You can download BizTalk Pipeline Components Extensions Utility Pack from GitHub here:

BizTalk Pipeline Components Extensions Utility Pack

The post BizTalk Server 2020 – 20 days, 20 posts: Zip File Pipeline Component for BizTalk Server 2020 appeared first on SANDRO PEREIRA BIZTALK BLOG.