If so, just mount it, delete whatever you need to delete, then eject it.
It will still be a "dmg" -- just a smaller one.
Just so the OP doesn't get confused...
The size of a disk image file (.dmg) will not automatically decrease after you delete any of the contained files. As far as I know, making a disk image file smaller requires using a Terminal command like 'hdiutil compact' (for sparse types) or 'hdiutil resize' (
I think) for a regular read/write .dmg file.
How do i extract it without freeing up space on my hdd?
Do you want to
copy files from the 200GB dmg onto your HDD? If so, you must have the extra storage space. Keep in mind that the files
within the dmg might take up much less than 200GB. (Some dmg are fixed size, even if there are no files at all within it!)
Instead of copying files out of the dmg, you could mount it (typically done by double-clicking the .dmg file in Finder) and just "use" the files directly while they stay in the dmg. You'll be abe to open, edit, delete them as usual with Finder.
Or how can I delete files in the dmg file itself?
Once mounted, you may use Finder to delete files from the dmg. However, as I mentioned above, deleting files from the dmg will
not (automatically) make the dmg smaller. I know that sounds surprising, but that's the way disk images work. (Unless I'm forgetting something!)
If you really want to copy large amounts of the files to your computer HDD, I think you need to get an external drive, put the dmg on it, and delete the dmg from your internal HDD (thus freeing up 200GB on the internal drive).