(f Field)
| 302 | } |
| 303 | |
| 304 | func (w *compactWriter) WriteField(f Field) error { |
| 305 | if f.Type == STOP { |
| 306 | return w.binary.writeByte(0) |
| 307 | } |
| 308 | if f.ID <= 15 { |
| 309 | return w.binary.writeByte(byte(f.ID<<4) | byte(f.Type)) |
| 310 | } |
| 311 | if err := w.binary.writeByte(byte(f.Type)); err != nil { |
| 312 | return err |
| 313 | } |
| 314 | return w.WriteInt16(f.ID) |
| 315 | } |
| 316 | |
| 317 | func (w *compactWriter) WriteList(l List) error { |
| 318 | if l.Size <= 14 { |
nothing calls this directly
no test coverage detected