Hi!
I would like if it's correct for me to assume the conclusion at the end of the following.
Let's supposed I've completed the compression of huge files and it gives me a single .7z file of 5 GB for example. On a custom made server where I need to drop fthe result, I can't drop the file as is because of the file system on server's disk, single file can't be larger than 2 GB. So I splitted the 5 GB .7z file into 5 smaller file of 1GB and drop them on the server. Then I recuperated somewhere else. My files were labeled something like test.7z.001, test.7z.002, and so on. I was extremely surprise to see that I did not need to manually combine the files to get back my .7z original file. The application 7-Zip was able to directly work with these manually splitted file and extract individual content or the whole thing. I tried that by accident and it seems to work.
I am extremely suprise because WinZip can't do that neither WinRAR with manually splitted archive like that. They both support splitting on more than one file something compressed, but the splitting had to be done by the application, it can't be done externally. I guess it includes headers or a table or something to dispatch something in each separate files, I don't know. But apparently 7-Zip doesn't complain to split the whole thing the way I did.
So my questions are:
Am I correct to assume I may manually externally split a resulting .7z file and 7-zip application will be able to extract files from them without having to manually recombine the whole thing?
Is there a limitation I am not thinking about?
May I split in the size I want? I guess it has to be a multiple of 1MB or something?
It's not because I tried it today with many many files that it proves it's okay to do it. Maybe there is a limitation I ignore. So I am asking here hoping a knowledgeable person could answer. I might change a way of working at work if this is correct to assume and it's huge so I want to make sure I am assuming right from a knowledgeable person and not do it on a large base just because I tested it a few times.
Thank you.
7-Zip uses split format without headers. So it's independent from another archive level, for example, you can split rar or zip.
and
archive.zip.001
is not same thing as native ZIP's splitarchive.z01
.When you extract that
archive.7z.001
7-Zip opens both levels (split and 7z), so it looks like one level for user.You can set any size of volume and you can use different sizes for different volumes :
The limitattion of 7-zip's 7z split, that you need all volumes to extract any file. It doesn't allow corruption or missing of some volume.
Ok. Good.
I was talking with someone else on that and the person corrected me since I was wrong.
We may do the same with WinRAR with a .rar file and a .zip file.
I tested it and it does work. I don't know what I did wrong yesterday when I tested with WinRAR.
I will write later today why it was a concern for me and why it makes me happy.
There is still something nice with 7-zip we can't do as efficiently with WinRAR.
Thanks.
Denis.
Here is why I am happy I may split the .7z externally myself in straight block.
I will not go too much in the detail but will explain just the minimal to understand my point.
I have thirty thousands of files on the network here.
Files are organized in hundreds of various directory levels.
I need to prepare package of files to client.
I can't predict which files to provide and they need to be provided in different directories from a time to another, with different names for both the directory and the filenames.
I do have to prepare package which include from three to two hundreds of these files.
I have well organized applications and scripts made in the last twenty years to pickup properly the group of files required depending on what I need to provide to my clients.
Obviously I compressed them into ONE file so it's simpler for them.
I need to organize the files in a certain directory structure so my client when he will unzip the file it will create the specific directory tree it needs to work.
Let's suppose an example with three files from the network which might be like this:
File1: \server1\reports\logs\raw\2018\split\23\skillet.bin
File2: \server2\bare\suit\apple\redgreenblue.kkk
File3: \server4\apps\maker\game\dip23.exe
Inside the archive these three files might need to be organized like:
File1: code42\data\tab1e1.dat
File2: code42\data\tab1e2.dat
File3: code42\app.exe
So twenty years ago my applications were moving locally to my local hard disk the files from the network into the required directories for the client, then I zipped them and the file were ready for the client and then I erased my temporary tree of files I used for the zip.
That was with 32 MB files for example.
As times goes, the files get bigger and larger like 200 MB for example.
So I modified the application to use WinRAR in command line to first compress the files taken them from the original location and then rename the file once inside the archive.
This was fast since I did not manipulate the same data twice.
This worked fine.... For a while...
I don't know if you know but in a .RAR, the table with the filenames is at the beginning of the archive. As a result, if you want to rename a file, just for inserting a few byte more to enlarge a filename inside the archive, since it is at the beginning in the table, WinRAR needs to displace bunch of mega bytes of data. So when files get larger five years ago like 1GB for example, just renaming the file inside the archive was long because of that.
So I was happy to discover and use 7-Zip because that table is not at the beginning but at the end.
Renaming a file inside a .7z, even if it is a 1 GB is very fast compare to WinRAR.
BUT recently I cam across a problem: where I am storing the file for the client for the transfer, it can't handle file larger than 2GB.
So I though I would just use the feature of splitting the archive in few files.
BUT then I discovered 7-Zip cannot modified a filename inside an archive splitted on two files!!!
It works only in one single file archive...
So I though I was in a deadlock situation...
But luckily, I discovered during the weekend that I may create the archive on a single file and then I can split it myself with a tool I can easily to break the file in two or more after the single .7z file was created.
So that's why I am happy it works.
But what could make me happier would be to see WinRAR or 7-Zip or something to allow me to finally be able to do simple thing like this:
7z.exe a OutputArchive.7z InputFileName.ext Destination\Filename\In\Archive.ext
See? Be able to specify the filename inside the archive at the compression time and not having to rename them each time after they have been place inside the zip.
Or even better for me: be able to provide a king of file list: even line is the source filename and odd line would be the destination filename once inside the zip.
So my above example I would create a filelist.lst file with this:
\server1\reports\logs\raw\2018\split\23\skillet.bin
code42\data\tab1e1.dat
\server2\bare\suit\apple\redgreenblue.kkk
code42\data\tab1e2.dat
\server4\apps\maker\game\dip23.exe
code42\app.exe
It would be something like:
7z.exe a OutputArchive.7z -i@filelist.lst
This last one would be the paradise!
I am surprise to see still in 2018 no compressor that can do something like that, being able to specify clearly source/destination inside the archive.
Anyway, if you follow me until here, I guess you saw I found a way to have the whole think working.
Thanks.
Denis.
Note.
I though and tested doing that using something similar to a simlink. But I would need to do that hundred of times per package prapartion sometimes... I don't want to do that.
Renaming in archive is slow in 7-Zip/7z too.
Full archive read/write is required.
Last edit: Igor Pavlov 2018-05-23
Hum...
I've just took the time to test it manually and you're right.
I was sure I've tested long time ago and I've remembered it was quick.
Well... I'll go to hang myself now... :-(
No but seriously, regarding the point of having a file on a path like x:\this\is\a\long\way\to\go\file.bin to be compressed in such way inside the archive the name would be like saved\in\another\path\and\name\samefile.bin is there a way we could do that without renaming internally the file?
If I was stupid so far, maybe there is an obvious way I did not see yet... :-(
You can create required folder structure on file system.
Then you can move files there or create hardlinks for required files. It's fast.
Then compress that structure to archive.