Reimport/recompress from -O file

Doubts, help and support about QuickBMS and other game research tools
elit
Posts: 2
Joined: Fri Feb 15, 2019 12:08 am

Reimport/recompress from -O file

Post by elit »

Greetings. I found -O option is able to extract archive to single file. This is great and it mean QuickBMS could be easily also used as an universal "precomp" for better data compression. However, I could not find the way how to reimport to original archive back from single output file that was created with -O option.
I simply tried on zip file with few files in it. It extracted correctly to single file with -O file option, but doing reverse with -r -w did not worked:
"- 7 files or logs left original, not available in the folder" - meaning it did not understand it was supposed to read from that single file instead of directory.
Considering -O option must exist there for a reason, is this supposed to work and/or is there a way to do such thing with quickbms? As this would make it extremely useful as an advanced inflator(for better compression).

Thank you.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Reimport/recompress from -O file

Post by aluigi »

Interesting.
Added to the list of things to fix for the next version :)
Thanks
elit
Posts: 2
Joined: Fri Feb 15, 2019 12:08 am

Re: Reimport/recompress from -O file

Post by elit »

No I thank you Aluigi, for everything.
At least major compressors(zlib, deflate, lz4,...) may need to support important cmp parameters though, as CRC will have to be 1:1. Lot of it will be able to be solved by xdelta so even if its not exact(aka lz4, zstd, some headers disparity) - for many that may not be such problem, but at least option to set compression levels in addition to dict size will be certainly needed. It may also be good idea to implement such automatic "delta" internally, this would also solve lot of current reimport problems people have.
Regards