func (k *Writer) WriteU2be(v uint16) error {
	binary.BigEndian.PutUint16(k.buf[:2], v)
	_, err := k.Write(k.buf[:2])
	return err
}
WriteU2be writes a uint16 in big-endian order to the underlying writer.
package kaitai
import (
	"encoding/binary"
	"io"
	"math"
)
type Writer struct {
	io.Writer
	buf [8]byte
}
func NewWriter(w io.Writer) *Writer {
	return &Writer{Writer: w}
}
func (k *Writer) WriteU1(v uint8) error {
	k.buf[0] = v
	_, err := k.Write(k.buf[:1])
	return err
}