encodeToByteArray

open suspend fun encodeToByteArray(format: F): ByteArray(source)

Encodes this material into a ByteArray in the specified format.

Use encodeToByteArrayBlocking when calling from non-suspending code.