AnsweredAssumed Answered

What's the best way to unzip a gzip or non-winzip compressed file?

Question asked by ArunRamachandran892 on Jun 16, 2011
Latest reply on Jul 20, 2011 by tlui
Q1. What's the best way to unzip a gzip or non-winzip compressed file?
We often get files from clients with different compression formats.

The two ways I can think of are:
1. Write a groovy script in a "custom scripting" Data Process shape
The groovy script will need to import the relevant Java library that supports gzip or some other compression format.
I also imagine that I will need to first place the appropriate Java jar file that contains this library in the Atom\lib folder.

Is this possible? Can I read a binary file stream containing the compressed file and then inflate it with a Groovy script this way and then write the inflated text stream back to the disk? Or, can I run a command that does this without having to deal with streams?

2. Write a command line app that does the custom zip/unzip (use 7-zip command line), and invoke the command line from a "System command" in the Program Command shape.

In this case, I have two sub-questions:
Q2a. Will the Boomi process wait for the command line to finish execution and return control back to the Boomi process before the Boomi process  continues processing?
Q2b. Can I invoke the command line script to run under a specific Windows login account for security reasons? I guess the Windows "runas" command can be used for this.

Thanks!
Arun


Outcomes