func NewRequiredField(pth []string, opts ...func(*RequiredField)) RequiredField {
	r := RequiredField{
		pth:         pth,
		compression: sch.CompressionCodec_SNAPPY,
	}
	for _, opt := range opts {
		opt(&r)
	}
	return r
}
NewRequiredField creates a required field.
package parquet
import (
	"bytes"
	"compress/gzip"
	"math/bits"
	"strings"
	"github.com/valyala/bytebufferpool"
	"fmt"
	"io"
	"github.com/golang/snappy"
	"github.com/parsyl/parquet/internal/rle"
	sch "github.com/parsyl/parquet/schema"
)
type RepetitionType int
const (
	Unseen   RepetitionType = -1
	Required RepetitionType = 0
	Optional RepetitionType = 1
	Repeated RepetitionType = 2
)
var (
	buffpool = bytebufferpool.Pool{}
)
type RepetitionTypes []RepetitionType
func (r RepetitionTypes) MaxDef() uint8 {
	var out uint8
	for _, rt := range r {
		if rt == Optional || rt == Repeated {
			out++
		}
	}
	return out
}
func (r RepetitionTypes) MaxRep() uint8 {
	var out uint8
	for _, rt := range r {
		if rt == Repeated {
			out++
		}
	}
	return out
}
type RequiredField struct {
	pth         []string
	compression sch.CompressionCodec
}