func corrupted() {
	panic("Document is corrupted")
}
--------------------------------------------------------------------------
Some helper functions.
package bson
import (
	"fmt"
	"math"
	"net/url"
	"reflect"
	"strconv"
	"sync"
	"time"
)
type decoder struct {
	in      []byte
	i       int
	docType reflect.Type
}
var typeM = reflect.TypeOf(M{})
func newDecoder(in []byte) *decoder {
	return &decoder{in, 0, typeM}
}