Support simplified encoding param for ByteBuffers.

- Allow passing just the encoding param instead of full options
  for common cases.