0

Long story short: I have big (700+ GB) .tar.bz2 archive and I wanted to decompress it. It is stored on very slow HDD, so it took my computer about 110 hours nonstop working to get 92% of data. But then I accidentally close the terminal with unarchiving process.

If decompressing process was stopped can it continue from the breakpoint or skip already unzipped files or skip some offset?

superpupervlad
  • 122
  • 1
  • 8

1 Answers1

0

Yes, it is possible in principle since a bzip2 file consists of independent blocks, each of which starts with a specific marker that you can search for. Also a tar file consists of independent blocks for each file, for which you should be able to find headers on some 512-byte boundaries.

You would need to write your own code to poke around and try to find out where you left off, assuming you know what the last file extracted was. Then you could continue to decompress from there.

Mark Adler
  • 101,978
  • 13
  • 118
  • 158
  • The blocks are very easy to find. What is not so easy is to know which blocks of the offsets into the uncompressed file that each block maps to. You have to perform most of the decompression logic to get this. You could also generate it while compressing but none of the compressors I'm aware of has an option to do so yet. – hippietrail May 15 '22 at 02:52