Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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!

share|improve this question

2 Answers 2

up vote 1 down vote accepted

DMG files are simply ISOs. The Disk Utility can create them in various formats (disc ready, encrypted, etc.) but there is no compressed option. 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.

share|improve this answer
    
Why then usually downloaded DMGs are smaller than its extracted content? –  Jack Dec 10 '10 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 '10 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 '10 at 18:48
    
Just tried: it creates it and compress it but then it's not modifiable anymore :( –  Jack Dec 10 '10 at 18:49
    
@Jack ... indicating those features (modifyable & compressed) are exclusive. –  Daniel Beck Dec 10 '10 at 19:52

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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