droppedBytes is how many middle bytes the ring discarded; 0 while the whole output still fits head+tail.
()
| 265 | // droppedBytes is how many middle bytes the ring discarded; 0 while the whole |
| 266 | // output still fits head+tail. |
| 267 | func (w *headTailBuffer) droppedBytes() int64 { |
| 268 | if d := w.tailBytes - int64(len(w.ring)); d > 0 { |
| 269 | return d |
| 270 | } |
| 271 | return 0 |
| 272 | } |
| 273 | |
| 274 | // totalBytes is the full combined output size as written, kept or not. |
| 275 | func (w *headTailBuffer) totalBytes() int64 { |