… | |
… | |
453 | when there is trailing garbage after the CBOR string, it will silently |
453 | when there is trailing garbage after the CBOR string, it will silently |
454 | stop parsing there and return the number of characters consumed so far. |
454 | stop parsing there and return the number of characters consumed so far. |
455 | |
455 | |
456 | This is useful if your CBOR texts are not delimited by an outer protocol |
456 | This is useful if your CBOR texts are not delimited by an outer protocol |
457 | and you need to know where the first CBOR string ends amd the next one |
457 | and you need to know where the first CBOR string ends amd the next one |
458 | starts. |
458 | starts - CBOR strings are self-delimited, so it is possible to concatenate |
|
|
459 | CBOR strings without any delimiters or size fields and recover their data. |
459 | |
460 | |
460 | CBOR::XS->new->decode_prefix ("......") |
461 | CBOR::XS->new->decode_prefix ("......") |
461 | => ("...", 3) |
462 | => ("...", 3) |
462 | |
463 | |
463 | =back |
464 | =back |