func (d *Decoder) SetMaxStringLength(n int) {
	d.maxStrLen = n
}
SetMaxStringLength sets the maximum size of a HeaderField name or
value string. If a string exceeds this length (even after any
decompression), Write will return ErrStringLength.
A value of 0 means unlimited and is the default from NewDecoder.
package hpack
import (
	"bytes"
	"errors"
	"fmt"
)
type DecodingError struct {
	Err error
}
func (de DecodingError) Error() string {
	return fmt.Sprintf("decoding error: %v", de.Err)
}
type InvalidIndexError int
func (e InvalidIndexError) Error() string {
	return fmt.Sprintf("invalid indexed representation index %d", int(e))
}
type HeaderField struct {
	Name, Value string
	Sensitive bool
}
func (hf HeaderField) IsPseudo() bool {
	return len(hf.Name) != 0 && hf.Name[0] == ':'
}
func (hf HeaderField) String() string {
	var suffix string
	if hf.Sensitive {
		suffix = " (sensitive)"
	}
	return fmt.Sprintf("header field %q = %q%s", hf.Name, hf.Value, suffix)
}
func (hf HeaderField) Size() uint32 {
	return uint32(len(hf.Name) + len(hf.Value) + 32)
}
type Decoder struct {
	dynTab dynamicTable
	emit   func(f HeaderField)
	emitEnabled bool  
	maxStrLen   int   
	buf []byte  
	saveBuf bytes.Buffer
	firstField bool  
}
func NewDecoder(maxDynamicTableSize uint32, emitFunc func(f HeaderField)) *Decoder {
	d := &Decoder{
		emit:        emitFunc,
		emitEnabled: true,
		firstField:  true,
	}
	d.dynTab.table.init()
	d.dynTab.allowedMaxSize = maxDynamicTableSize
	d.dynTab.setMaxSize(maxDynamicTableSize)
	return d
}
var ErrStringLength = errors.New("hpack: string too long")