atproto_core.cbor.cbor

atproto_core.cbor.cbor.decode_dag(data: bytes) dict

Decode and returns a single data item from the given data, with the DAG-CBOR codec.

Parameters:

data – The stream of bytes or bytes with DAG-CBOR data.

Returns:

Decoded DAG-CBOR.

Return type:

dict

atproto_core.cbor.cbor.decode_dag_multi(data: bytes) List[dict]

Decode and returns many data items from the given data, with the DAG-CBOR codec.

Parameters:

data – The stream of bytes or bytes with DAG-CBOR data.

Returns:

Decoded DAG-CBOR.

Return type:

list of dict