Group encode overloads together again
Fix docs for encode overload
Merge pull request #2825 from ntrel/encode-docs

Fix docs for encode overload