SPDY: better encapsuation of header encoding/decoding