toDataItem

suspend fun toDataItem(compressionLevel: Int = 5): DataItem

Serializes and compresses this MpzPass into a DataItem.

The credential data payload is encoded to CBOR and then compressed using the DEFLATE algorithm.

Return

A DataItem.

Parameters

compressionLevel

The DEFLATE compression level to use (0-9). Defaults to 5.

Throws

if the compression level is out of range.