Use external red/black tree package

This commit is contained in:
Derek Parker
2014-08-07 11:03:42 -05:00
parent d977810626
commit 0af47b64ce
4 changed files with 37 additions and 105 deletions

View File

@ -14,7 +14,7 @@ type parsefunc func(*parseContext) parsefunc
type parseContext struct {
Buf *bytes.Buffer
Entries FrameDescriptionEntries
Entries *FrameDescriptionEntries
Common *CommonInformationEntry
Frame *FrameDescriptionEntry
Length uint32
@ -23,10 +23,10 @@ type parseContext struct {
// Parse takes in data (a byte slice) and returns a slice of
// CommonInformationEntry structures. Each CommonInformationEntry
// has a slice of FrameDescriptionEntry structures.
func Parse(data []byte) FrameDescriptionEntries {
func Parse(data []byte) *FrameDescriptionEntries {
var (
buf = bytes.NewBuffer(data)
pctx = &parseContext{Buf: buf}
pctx = &parseContext{Buf: buf, Entries: NewFrameIndex()}
)
for fn := parseLength; buf.Len() != 0; {