When parsing CBOR payloads, CompositeDecoder.decodeCollectionSize() currently always returns -1 (unknown size). However, the CBOR specification supports definite-length maps and arrays (Major Types 4 and 5), where the exact size is explicitly declared in the binary header.
Because the decoder ignores this header information, custom serializers cannot pre-allocate collection capacities, leading to expensive memory reallocations on large payloads (especially problematic on Android).
Proposed Solution
Update CborMapReader and CborListReader to parse and return the exact integer size from the binary header when a definite-length map or array is encountered.