// apply takes the operation and transforms the decoder dictionary accordingly.
apply takes the operation and transforms the decoder dictionary accordingly.
// apply takes the operation and transforms the decoder dictionary accordingly .
func (d *decoder) apply(op operation) error {
	var err error
	switch x := op.(type) {
	case match:
		err = d.Dict.writeMatch(x.distance, x.n)
	case lit:
		err = d.Dict.WriteByte(x.b)
	default:
		panic("op is neither a match nor a literal")
	}
	return err
}
func ( d * decoder ) apply ( op operation ) error { var err error switch x := op . ( type ) { case match : err = d . Dict . writeMatch ( x . distance , x . n ) case lit : err = d . Dict . WriteByte ( x . b ) default : panic ( " " ) } return err }
apply takes the operation and transforms the decoder dictionary accordingly.
apply takes the operation and transforms the decoder dictionary accordingly .