I don’t understand this comment – CScriptNum
is little endian in the first place, isn’t it? Both my understanding of the code and definition suggests it is, and the wiki seems to agree, at least.
The differences between CScriptNum
and this proposal aiui are fixed vs variable length encoding, and using twos-complement vs a sign bit to handle negative numbers.