optimized HeaderTable implementation for Encoder