Android Question unzip a multi volume zip (multipart)

peacemaker

Expert
Licensed User
HI, All

Anyone tried to download big file inside a multipart ZIP archive and unzip it ?
Any suggestion, code class ?
 

drgottjr

Well-Known Member
Licensed User
how big is big? how big will it expand to? how big will it and the other files in the archive expand to? how much storage is available on your device?
 
Upvote 0

drgottjr

Well-Known Member
Licensed User
i have to download a multi-file zipped archive daily. 1 file is much larger than the others, so there is nothing unusual about the concept. 200MB zipped might be a reason for some concern, but not due to a failing on the part of the archiver. even downloading 200MB is not necessarily doomed. expanding such a file is probably an issue. you don't say at which point the file is "broken". i'm guessing during expansion. hard to say how much work space is needed above and beyond the initial 200MB to hold the original file + the amount of memory needed to hold the expanded file. can you break up the 200MB? maybe try a different archiver. there is more than 1 implementation out there.
 
Upvote 0

peacemaker

Expert
Licensed User
Situation is so: many devices must download this big file from the FTP server, via mobile internet. Next work is impossible if the file is not got fully correctly, binary correct.
The file is of special format and big, it's alone - so cannot be easily splitted (as if many small files by several ZIP archives).
In whole system works, 200MB file allows to work, but sometimes, depending on the mobile Internet quality - the file is not fully downloaded, FTP server closes the connection after some time if any trouble.

So, how to ensure the file downloading at such situation ?
I guessed, that splitting into a multipart ZIP may help to download with higher probability.
But cannot find an Unzip way for these atchives.
 
Upvote 0

emexes

Expert
Licensed User
Are you also at the other end of the transfer, making the big file that is to be downloaded to the many devices?

Also, is the file only changing a little from day-to-day? Like, is it a database where only a relatively small proportion of the records are updated or added each day?
 
Upvote 0

peacemaker

Expert
Licensed User
Yes, this file is updated rarely (i can prepare it for FTP by any way), but.... the task is the same - for sure download it fully solid.
No, this file is binary, not partially updated.
Task is to get every time a huge file (OK, slow, but for sure) via unstable mobile link.
 
Upvote 0

DonManfred

Expert
Licensed User
Have you tried ArchiverPlusZip from the ProBundle?

- ArchiverPlusZip v1.13
Based on the Zip4j library, this library allows to add, extract, update and remove files from a zip archive.
It supports encryption and decryption (standard and AES), Zip64 format and split zip archives. It is compatible with B4J.
 
Upvote 0

emexes

Expert
Licensed User
No, this file is binary, not partially updated.
Sorry to hark on this point, but the potential benefits are too great to not double-check that I'm not misunderstanding your use case. ✌

What is this binary file? A video file? A database dump? A text file of delivery point addresses? A collection of audio fragments?

Is it hundreds of MB of fresh brand new data each time, with no echo of the previous data?
 
Upvote 0

emexes

Expert
Licensed User
Then DonManfred's solution is probably best, as per usual 🍻

A backup plan if that solution doesn't pan out could be: split the original big file into xxx MB chunks and Zip each chunk individually, so that you have say 20 x 10 MB Zip files to download. Download the chunk Zips one-by-one (no parallel download acceleration) and as you receive each chunk Zip: extract the chunk and add it to the local copy of the decompressed file that you are building up chunk by chunk, and then delete the Zip.

That way you'd have an extra eg 190 MB space on the phones, because they wouldn't need to have all 200 MB of compressed data all at the one time. Although presumably this 190 MB pales in comparison to the size of the original file uncompressed. Or are you just using the archive process to split the file and provide error checking?
 
Upvote 0

peacemaker

Expert
Licensed User
Yes, thanks, plan looks OK. Firstly will try the lib to unzip the regular multipart ZIP, as yes - error checking is the must.
 
Upvote 0
Top