The QuantityOrFlags push-value has a bit to differenciate between those two, is too complex for clients to use.
The push-value QuantityOrFlags is a designed in a way that bugs will be too easy to get into client software.
It can be different bit-widths (see #3 (closed)), but only if its a quantity. Because a Flags push needs to have its bit 64 set, which implies it can not be smaller than that. A bit ironic is that there are nowhere near 64 flags.
Software all over the net which will parse the pushes should have no trouble making the differentiation between the two and checking for bit 64 is not the easiest way to do this.
I'd prefer a simpler alternative. Here is one suggestion: Encode the flags or quantity as a struct like this; The effect of this suggestion is that the actual amount (aka quantity) is simply one bit shifted, or multiplied by two.
Based on the fact that software always needs to check if this is a value or a flags, before interpreting it, the simplest way to do so is important.
Additionally this makes the "Flags" version no longer take up 8 bytes but only one.
Edited to clarify the actual issue and strike out the suggestion to avoid confusing this about this being a personal preference instead of a bugreport.