https://arstechnica.com/gadgets/2013/10/os-x-10-9/17/
Just to nitpick, on Linux it depends on your distribution (or yourself) having enabled zram; some modern distributions enable it by default on recent releases, but yours might not have.
You can run 'zramctl' to see the current status of the zram devices.