Compressing a DD image - caveats and optimal settings

1

0

I have a 30GB dd image of an SD card, and am using the 7-Zip command line to compress it. Are there any particular options I should enable or avoid when it comes to a dd image that, presumably, must remain absolutely unchanged in order to ensure it can be recovered from?

For example, should solid compression be avoided? Is there a compression algorithm that's likely to compress dd images more efficiently (i.e. that offers the best trade-off between speed vs time) than any other? And so on.

Alternatively, are bit-wise images compressed in pretty much the same way as any other data would be? This is also a valid answer.

Here's what I have so far:

 7z a -t7z -mx=9 -ms=on "SDcardbackup" "SDcardbackup.img"

Hashim

Posted 2019-01-24T01:33:32.523

Reputation: 6 967

Often it's good to write zeros to unused sectors, so the image compresses better. Please read this answer.

– Kamil Maciorowski – 2019-03-06T17:58:42.533

No answers