dtgreene: Linux actually has something like this; zram.
The zram creates a block device in memory that compresses data written to it and decompresses on read. By putting a swap partition here, one can get the OS to compress memory, which can be useful on some systems (I believe modern Android may use this by default; for older Android I believe it was a common tweak for rooted devices). Alternatively, you can make a filesystem on the device and use it as a compressed ramdisk.
rtcvb32: I tried this out, and it had good results. Make any filesystem transparently compressed!
Though you can't tell it to re-compress the blocks better or anything, and you can't save the compressed data to disk or anything you only get the transparently decompressed portions. So it has it's flaws. Having the OS decide to compress memory via a compressed swap seems a good middle ground when using a ramdrive and having a lot of ram for speed, though once you start getting under 512MB free, i'd start getting worried as i have had a computer totally STOP... Because it's doing so much background work you can't get it to free memory/programs/files to fix the problem...
If your kernel is recent enough, you can at least tell it to discard blocks that correspond to deleted files; just use fstrim, as the discard operation will be handled by the zram device.
Discard also works for many other devices in Linux, including loop devices (punching holes in the underlying files), many device mapper targets (passing it down to the device below, with some targets doing other things with the result (dm-thin); note that LVM uses the device mapper), and of course "raw" Solid State Drives (where the kernel actually sends the TRIM command to the physical drive).
If you find yourself getting worried about problems when low on RAM, you could try something like earlyoom.
dtgreene: By the way, I can think of one good reason to use a ramdisk on a modern OS that has good disk caching (that is, not Windows XP). Using a ramdisk can prevent writes from ever reaching the disk; this can be useful if it's data that you don't care about (or even actively want to get rid of after use), and can save your disk some wear and tear. One could, for example, put the browser cache there (in fact, I am currently considering doing this for my Raspberry Pi 4, to see if it makes a difference). Ramdisks are also useful when running from read-only media, or, in the case of Linux, before the system has mounted the actual hard drive.
rtcvb32: Ramdrive of temporary files... Yep... just need a script that runs during startup to make the ramdrive, make the directory and set your programs to use that space. Then you're probably good to go...
Or you can just put it in fstab, or even (on systemd systems) use a systemd mount unit.