Differences to CCompactSize and CVarInt I'm developing a parser bitcoin core and I have a problem whit the type CVarInt, I using the decodifier mode of the CCompact size but at the block 976 I Have a problem whit the type, because the value id is unusually, so I have a question why the bitcoin core decided the change implementation to
CCompact size into CVarInt?

What was introduced in the bitcoin core versions to require a change of implementation?

Sorry for my terrible English but I'm learning.
CVarInt encoding is only used in the storage of the UTXO set internally, and never in the P2P protocol. CCompactSize is used in a number of places, including the number of transactions per block, the number of inputs and outputs per transaction, and the length of scripts.

If you're parsing block data, you will never encounter a CVarInt. If you're running into problems, it's almost certainly something else, or there is a bug in your CCompactSize decoder.