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!

2 Answers 2

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.

7
  • Why then usually downloaded DMGs are smaller than its extracted content?
    – Jack
    Dec 10, 2010 at 18:00
  • 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
    Dec 10, 2010 at 18:21
  • 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
    Dec 10, 2010 at 18:48
  • 1
    @Jack ... indicating those features (modifyable & compressed) are exclusive.
    – Daniel Beck
    Dec 10, 2010 at 19:52
  • 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
    Sep 5, 2018 at 20:28
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.