A quick look in the
zfs(8) manpage and searching for "compression" would have answered most of your questions (e.g. that zstd is not yet available in -RELEASE). Before using google to get a ton of unrelated (i.e. linux-specific) or often outdated information, the manpages or the FreeBSD handbook are usually the best place to start searching.
The quarterly status reports are also always a good starting point when it comes to new features. In fact the last report explicitly mentions zstd:
The entry in the status reports already mentions him, and Allan Jude was/is one of the driving forces behind zstd on FreeBSD. His talk+slides from BSDcan 2018 about it can be found here:
papers.freebsd.org
(one of the first search results btw...)
The talk mentiones this code review:
reviews.freebsd.org
which links to the commit in August 2020:
This PR adds two new compression types, based on ZStandard: - zstd: A basic ZStandard compression algorithm Available compression. Levels for zstd are zstd-1 through zstd-19, where the compressi...
github.com
So given that timeline, FreeBSD 12 obviously won't support zstd out of the box, but it will (most likely) be available in FreeBSD 13. For FreeBSD 12.x you'd have to use the openzfs version from ports/packages as
suntzu00 already mentioned.
But if you take a look at page 17 of the slides of Allan Judes talk, you can see that when it comes to decompression, LZ4 (1) is still much faster. So for most use cases (which are usually read-intensive), LZ4 might still be the best option. zstd shines when high compression ratios with (somewhat) high compression rates are needed and especially it's adaptive compression might be very interesting for several use-cases (i.e. databases).
What command to run to see the compressed size of a file in dataset with zstd turned on and what is actual size of this the same file?
There is no such command, zfs doesn't work that way. Compression is set on a per-dataset level and you can only see the compressratio and the space used by a dataset. Look for the descriptions of "(logical)referenced" and "(logical)used" in the manpage.