It would help if you'd be a bit more specific. We claim to know FreeBSD here but not necessarily Linux, and quite frankly I have no idea what zram is supposed to be. Alas, I found this:
https://en.wikipedia.org/wiki/Zram
FreeBSD can also do this (assuming I understand what you're after), but in a different way. It supports virtual memory and can also use files for swap. For regular usage (such as temporary files in
/tmp) the
tmpfs is often used (see
tmpfs(5)).
Then memory disk support is provided through the
md driver, see also
mdconfig(8). This is most often used to gain access to images such as ISO files.
However, I'm not fully sure what you're after here. If this is about adding more swap space then you can also simply use
dd to create an imagefile and then use
swapon to initialize swap space on it. It works but I wouldn't recommend this.
Note that all this doesn't use any compressed images or such.
(edit): But when used on a compressed filesystem then I suppose you'll get somewhat of the same results. Though I wouldn't count on optimal performance though.
Hope this somewhat answers your question.