Add overloads for encodeOnly/decodeOnly that work nicer with inference