% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/r-wrappers.r
\name{decode_dag_cbor_multi}
\alias{decode_dag_cbor_multi}
\title{Decode multiple DAG-CBOR objects from a byte stream}
\usage{
decode_dag_cbor_multi(data)
}
\arguments{
\item{data}{A raw vector containing multiple DAG-CBOR encoded objects}
}
\value{
A list of R objects, each representing a decoded DAG-CBOR object
}
\description{
This function decodes multiple consecutive DAG-CBOR objects from a single raw
vector. The returned list includes a 'bytes_consumed' attribute indicating
how many bytes from the beginning of the input were successfully processed.
This is useful for streaming applications where you need to know where to
continue reading.
}
\examples{
# Decode two consecutive DAG-CBOR objects from a single byte stream
cbor_data <- as.raw(c(
  0xa2, 0x61, 0x61, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f,
  0x61, 0x62, 0x66, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x21,
  0xa1, 0x61, 0x63, 0x01
))
results <- decode_dag_cbor_multi(cbor_data)
attr(results, "bytes_consumed")
}
