Documentation
¶
Index ¶
- Constants
- Variables
- func Release(p *Packer)
- type Dictionary
- type HeadValueIndex
- type HeaderField
- type HeaderFields
- type HeaderIterator
- type HeaderWriter
- type Option
- type Options
- type PackPool
- type Packer
- func (packer *Packer) DumpTo(w io.Writer) (err error)
- func (packer *Packer) LoadFrom(r io.Reader) (err error)
- func (packer *Packer) PackTo(w io.Writer, iter HeaderIterator) (err error)
- func (packer *Packer) Reset(fields []HeaderField)
- func (packer *Packer) UnpackFrom(r io.Reader, header HeaderWriter) (err error)
Constants ¶
View Source
const (
DefaultMaxHeaderSize = 8 * 1024
)
Variables ¶
View Source
var (
DefaultPool = PackPool{}
)
Functions ¶
Types ¶
type Dictionary ¶
type Dictionary struct {
// contains filtered or unexported fields
}
func (*Dictionary) Get ¶
func (dict *Dictionary) Get(i int) (name []byte, value []byte)
Get field by index.
when length of name is 0, means not exist.
when length if value is 0, means name existed but value not exist.
func (*Dictionary) Index ¶
func (dict *Dictionary) Index(name []byte, value []byte) (int, int)
Index get header field index, return i and j.
when i < 0, means not found.
when i > -1 and j > -1, means found field, the j is the field index.
when i > -1 and j < 0, means found field name, the i is the name index.
func (*Dictionary) Load ¶
func (dict *Dictionary) Load(fields []HeaderField)
func (*Dictionary) Range ¶
func (dict *Dictionary) Range(f func(i int, name []byte, value []byte) bool)
func (*Dictionary) Reset ¶
func (dict *Dictionary) Reset()
type HeadValueIndex ¶
type HeaderField ¶
type HeaderFields ¶
type HeaderFields struct {
// contains filtered or unexported fields
}
type HeaderWriter ¶
type Option ¶
func MaxHeaderSize ¶
type Packer ¶
type Packer struct {
// contains filtered or unexported fields
}
func (*Packer) Reset ¶
func (packer *Packer) Reset(fields []HeaderField)
func (*Packer) UnpackFrom ¶
func (packer *Packer) UnpackFrom(r io.Reader, header HeaderWriter) (err error)
Click to show internal directories.
Click to hide internal directories.