func (b *Builder) ReachedCapacity(cap int64) bool {
	estimateSz := b.buf.Len() + 8 /* empty header */ + 4*len(b.restarts) + 8 // 8 = end of buf offset + len(restarts).
	return int64(estimateSz) > cap
}
func (b *Builder) ReachedCapacity(cap int64) bool {
	estimateSz := b.buf.Len() + 8  + 4*len(b.restarts) + 8 
	return int64(estimateSz) > cap
}
func ( b * Builder ) ReachedCapacity ( cap int64 ) bool { estimateSz := b . buf . Len ( ) + 8 /* empty header */ + 4 * len ( b . restarts ) + 8 // 8 = end of buf offset + len(restarts). return int64 ( estimateSz ) > cap }
// TODO: vvv this was the comment on ReachedCapacity.
// FinalSize returns the *rough* final size of the array, counting the header which is not yet written.
// TODO: Look into why there is a discrepancy. I suspect it is because of Write(empty, empty)
// at the end. The diff can vary.
// ReachedCapacity returns true if we... roughly (?) reached capacity?
TODO : vvv this was the comment on ReachedCapacity . FinalSize returns the * rough * final size of the array counting the header which is not yet written . TODO : Look into why there is a discrepancy . I suspect it is because of Write ( empty empty ) at the end . The diff can vary . ReachedCapacity returns true if we ... roughly ( ? ) reached capacity?