Although our connections are now so fast we may still need sometimes to compress data before attaching to mail or downloading into PC. SAP has possibilities to ZIP the content in class CL_ABAP_ZIP and ...
You might have a task to use or download one or all files attached to document saved via CV01N transaction. This is not a big deal really, you just need to use some FMs available in standard of SAP like ...