If you have some sort of uncompressed unfragmented block filesystem, aligned to 1K segments, such as an ISO, you can use this software to store the individual files but be able to reassemble the original whenever you want. The restored file will be bit-for-bit identical to the original regardless of the input file format. Only known file segments will be cut out.
For instance, if you have a copy of an Ubuntu installer:
$ 7z x ubuntu-21.04-desktop-amd64.iso -o"ubuntu-21.04-desktop-amd64.iso.unpack"
$ idx_blob.py ubuntu-21.04-desktop-amd64.iso
You'll get these files:
$ du -hs *
2.7G ubuntu-21.04-desktop-amd64.iso
2.1M ubuntu-21.04-desktop-amd64.iso.bin
44K ubuntu-21.04-desktop-amd64.iso.idx
2.7G ubuntu-21.04-desktop-amd64.iso.unpack
You can now throw out ubuntu-21.04-desktop-amd64.iso
and rebuild it at any time with:
$ rebuild_blob.py ubuntu-21.04-desktop-amd64.iso
You can specify another output path as a second argument if desired. The *.bin
file typically has a lot of empty
space in it, so you may want to compress it. The .idx
file is just a json mapping of where all the files
were cut out from the *.bin
file, which contains the "extra" data.