feedback from #413 and a few optimizations on hpack.