Pack const count using writeSmallShort3() and writeLimitedNumber()
Refactoring: extract method: repack()
Don't write tag for NameAndType constants.