func NewReader(r io.Reader) *Reader {
	return &Reader{
		r: bufio.NewReader(r),
	}
}
NewReader returns a Reader initialized with a buffered reader.
package marbl
import (
	"bufio"
	"encoding/binary"
	"fmt"
	"io"
)
type Header struct {
	ID          string
	MessageType MessageType
	Name        string
	Value       string
}
func (hf Header) String() string {
	return fmt.Sprintf("ID=%s; Type=%d; Name=%s; Value=%s", hf.ID, hf.MessageType, hf.Name, hf.Value)
}
func (hf Header) FrameType() FrameType {
	return HeaderFrame
}
type Data struct {
	ID          string
	MessageType MessageType
	Index       uint32
	Terminal    bool
	Data        []byte
}
func (df Data) String() string {
	return fmt.Sprintf("ID=%s; Type=%d; Index=%d; Terminal=%t; Data length=%d",
		df.ID, df.MessageType, df.Index, df.Terminal, len(df.Data))
}
func (df Data) FrameType() FrameType {
	return DataFrame
}
type Frame interface {
	String() string
	FrameType() FrameType
}
type Reader struct {
	r io.Reader
}