Windows comes with the ability to compress files. In practice, however, I found that the standard utility starts to choke when compressing larger flat files (greater than 2GB). To get around this problem within SSIS, I used the default WinZip program. There were some tricks to get it working, however.
Using a Process Task in the Control Flow of a package, I configured the following via Expressions in the Expression Editor:
- set the WorkingDirectory to the expected location of the data file
- set the Arguments to evaluate as: -min -a <fullpath>\<zipfile>.zip <fullpath>\<sourcefile>.txt
The Process Task Executable argument was set to the absolute path of the WINZIP32.EXE program (eg. C:\Program Files\WinZip\WINZIP32.EXE)