If an unknown type is passed-in, the fallback is used if given, else binary.
If you want to use a custom codec you can pass in an object containing a an encode and decode method and that will be returned.
If you pass a compact encoder, then it will be converted into a codec for you and returned.