decodeFromByteArray

open suspend fun decodeFromByteArray(format: F, bytes: ByteArray): M(source)

Decodes material from the given bytes encoded in the specified format and returns the resulting instance of M.

Throws an exception if the bytes are not valid for the given format or do not represent well-formed material.

Use decodeFromByteArrayBlocking when calling from non-suspending code.