Working on fragments

This commit is contained in:
Caleb Gardner
2020-11-23 06:44:39 -06:00
parent de45fc927d
commit ae2cc5ab54
7 changed files with 51 additions and 86 deletions
+2
View File
@@ -4,6 +4,7 @@ import (
"bytes"
"encoding/binary"
"errors"
"fmt"
"io"
)
@@ -67,6 +68,7 @@ func (br *BlockReader) parseMetadata() error {
}
func (br *BlockReader) readNextDataBlock() error {
fmt.Println("reading new block")
meta := br.headers[len(br.headers)-1]
r := io.NewSectionReader(br.s.r, br.offset, int64(meta.size))
if meta.compressed {