· Nov 8, 2017

Reading a zip file into a stream

I am using Cache FTP classes to download from a FTP site files, that include zip files.

I can retrieve the whole file into a stream, but it contains a lot garbage.


PKvªZK!—XÃ×$¯²4rNDDF Plus DB/Counseling Messages/CMM 1.0/RCMMD0_DESCNUnNUCX4NDDF Plus DB/Counseling Messages/CMM 1.0/RCMMD0_DESC´½[“ÛH’.ø¾fûð²ê*›¬ï—Q[›©n]²î®Ò–ª§Ï>‚$HbØ‘)ÊâÇ÷Ï=¸P™9gmlª•„‡.~ý|4Íñ)>$Uôîòäú6K“2Jó(ù¼MªŠþ2»¢J*ócåÅ%ºÄIt*JúO²K·iž˜Ë1Σ´ŠÊd[œNI¾Kvÿ÷ÿ5&faìÛ]|Nñçh_”Ñö˜f»2ÉMg4A´KiÜ%ÙE›+Qo/Ei~-d0VQl˜s ;­¢š¦)£ñ$º–˜lj>]xL|‰Ê¢8E—ätNÊøR—‰‰ŸxdI¿V4iz8^^Dþ3óþ±Hwî©«h[ä—8ÍÓüUñ)1ô’.&ùå›ê[¥..GºK7Æxcè

Is there a way to copy the zip file from the FTP site down without going through a stream?

Inside the zip file is 400+ files and directories.

Discussion (4)1
Log in or sign up to continue

Thanks for confirming my suspicions. I have a class method that zips and unzips files. But in this case the zip file is on the FTP site and still zipped. Won't be able to unzip until I can get it down to either my local or one of our servers.

But when I down load the whole file, the unzip program doesn't recognize it as a zipped file. So I was hoping someone had a way to download or copy it from the FDP server the without reading it line by line into a Stream.