Caveats about compressed DMG?

1

1

I was curious about using compressed and modifiable DMGs to store all kinds of data.

Eg: I've got a tablatures set for guitar which is like 120mb zipped and contains 60-70k files and 1.3Gb unzipped. Instead that keeping them unzipped I could store them inside a DMG to be able to access them without worrying about extracting (since the operation it is invisible compared to using a plain archive like a zip) and without cluttering the file system with lots of entries. Another example could be my abandonware collection, a lot of files, a lot of folders but not any really need to keep them directly inside the file system.

What I was wondering about is:

  • is it possible to have a DMG that is either compressed either modifiable? (Adding files to it just by drag'n'drop')
  • will this create any severe performance issue when accessing that files?
  • is it in general a good/usable idea?
  • finally, are there other more "cross-platform" solutions? Since DMGs are natively available only on OSX (I think)

Thanks in advance!

Jack

Posted 2010-12-10T17:03:15.687

Reputation: 455

Answers

2

DMG files are simply ISOs. The Disk Utility can create them in various formats (disc ready, encrypted, etc.) but if you select a compressed option the image will not be modifiable. They are completely portable as long as it's a format that system can read.

I've been using an encrypted DMG since I switched to OSX many years ago and have had no issues with them performance-wise.

kweerious

Posted 2010-12-10T17:03:15.687

Reputation: 356

1@kweerious DMGs can be compressed, but then they aren't modifiable. There is an option in Disk Utility to create a compressed image. – whoKnows – 2018-09-05T20:28:35.140

Why then usually downloaded DMGs are smaller than its extracted content? – Jack – 2010-12-10T18:00:34.397

It could have something to do with the filesystems involved, but that's a good question. It would be nice to know for sure. In regards to compressed DMGS, they don't have built-in compression like zips or anything. – kweerious – 2010-12-10T18:21:06.333

Actually if I create a sparse image with diskutil and then I select it and convert it through the convert button it allows me to choose as image format "compressed" so maybe it is possible to compress DMGs but without having a modifiable one. – Jack – 2010-12-10T18:48:46.427

Just tried: it creates it and compress it but then it's not modifiable anymore :( – Jack – 2010-12-10T18:49:37.877

1@Jack ... indicating those features (modifyable & compressed) are exclusive. – Daniel Beck – 2010-12-10T19:52:13.390

Yes, it seems so! – Jack – 2010-12-10T20:15:09.710

0

is it possible to have a DMG that is either compressed either modifiable? (Adding files to it just by drag'n'drop')

Yes. OS X can by using the somewhat more advanced bZip2 format. If you don't get the option in the Disk Utility format options try the open-source dmgCreator.

will this create any severe performance issue when accessing that files

That depends on your definition of "severe" -which only you can answer by trial and error. You might try to look into a file system that includes compression natively. The reduction in read/writes offsets the decompression time, but I don't know how well balanced the trade-off is.

is it in general a good/usable idea?

No, disk space is cheap and big media files typically don't benefit all that much. A text file can easily be 1/4 of the normal space, but movies, audio, and images are already compressed.

finally, are there other more "cross-platform" solutions? Since DMGs are natively available only on OSX (I think)

Zip files are about as close to universal compression as you can get.

Indolering

Posted 2010-12-10T17:03:15.687

Reputation: 101