func MinifyTo(r io.Reader, snapFreq float64, marshal ReplayMarshaller, w io.Writer) error {
	return MinifyToWithConfig(r, DefaultReplayConfig(snapFreq), marshal, w)
}
MinifyTo reads a demo from r, creates a replay and marshals it to w.
See also: ToReplay
package csminify
import (
	"bufio"
	"bytes"
	"io"
	"math"
	r3 "github.com/golang/geo/r3"
	dem "github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs"
	common "github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs/common"
	events "github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs/events"
	rep "github.com/markus-wa/cs-demo-minifier/replay"
)
type ReplayMarshaller func(rep.Replay, io.Writer) error
func Minify(r io.Reader, snapFreq float64, marshal ReplayMarshaller) ([]byte, error) {
	return MinifyWithConfig(r, DefaultReplayConfig(snapFreq), marshal)
}
func MinifyWithConfig(r io.Reader, cfg ReplayConfig, marshal ReplayMarshaller) ([]byte, error) {
	var buf bytes.Buffer
	err := MinifyToWithConfig(r, cfg, marshal, bufio.NewWriter(&buf))
	if err != nil {
		return nil, err
	}
	return buf.Bytes(), nil
}