I've checked HFS source code, but cannot understand how vfs file "chunk" works, thus I have no idea to decompress a vfs file with external tool.
Maybe someone else can explain this to us...
Search on 'main.pas' for 'addVFSheader' and you will see HFS is using ZLIB compression.
I've tried to decompress a VFS, and had "partial" success, following this steps...
WARNING: If you follow the next instructions, ALWAYS backup all your files first! Don't blame me if you do something wrong, or if you lose or corrupt some file, or if this doesn't work. If you choose to follow this, do it at your OWN risk.
1) Download
Offzip 0.4.1 from
HERE (it's a command line utility for doing zlib decompression).
2) If you have a VFS named
example.vfs run offzip with this:
offzip -a -z 31 example.vfs C:\
This will generate a dat file, like for example: C:\00000046.dat
3) Then using a
HEX Editor, edit your '00000046.dat' and change paths.
4) Finally you reimport/compress your edited dat file on the vfs, with:
offzip -a -r -z 31 example.vfs C:\
5) Open HFS and load your edited VFS, and you will get a warning message:
"This file is corrupted (CRC). Going on may lead to problems. It is adviced to stop loading. Stop?"
6) Click on 'Yes' and see if it works or not.
In my case, it failed. So, feel free to experiment using this tool, until you get the exact method to extract the data.
@Rejetto: adding an option to temporally save the VFS as an uncompressed file (without using ZLIB compression), could come handy in case some advanced user wants to externally edit the VFS. Or even better adding an option to blindly change drive paths in a VFS, for example, from C:\ to E:\ as this user is wanting. As always, my disclaimer:
I don't need this (and I'm sure you won't like to overload HFS with options, so, do what you think is best).
Cheers,
Leo.-