optimized decoding of PCT encoded octets
minor refactoring