func (lw LenWriter) Close() {
	lw.buf.WriteByte(EOO)
	Pack.PutUint32(lw.b, uint32(lw.buf.Len()-lw.off))
}
Close closes the current object being encoded by
writing bson's EOO byte and recording the length.
package bson
import (
	"io"
	"math"
	"reflect"
	"strconv"
	"time"
	"github.com/honeycombio/sqlparser/dependency/bytes2"
)
type LenWriter struct {
	buf *bytes2.ChunkedWriter
	off int
	b   []byte
}
func NewLenWriter(buf *bytes2.ChunkedWriter) LenWriter {
	off := buf.Len()
	b := buf.Reserve(WORD32)
	return LenWriter{buf, off, b}
}