示例#1
0
func NewRecordIndexer(f *os.File) Indexer {
	return &record{
		f:     f,
		r:     multi.NewReader(f),
		Index: New(),
	}
}
示例#2
0
func NewReader(f file.SectionReader) io.Reader {
	return &Reader{
		f:        f,
		r:        multi.NewReader(f),
		counter:  1,
		overflow: nil,
	}
}
示例#3
0
func NewChunkRecordIndexer(f *os.File) Indexer {
	fi, _ := f.Stat()
	return &chunkRecord{
		f:     f,
		size:  fi.Size(),
		r:     multi.NewReader(f),
		Index: New(),
	}
}
示例#4
0
文件: record.go 项目: MG-RAST/Shock
func NewRecordIndexer(f *os.File, nType string, snFormat string, snIndexPath string) Indexer {
	return &record{
		f:     f,
		r:     multi.NewReader(f),
		t:     nType,
		snf:   snFormat,
		snp:   snIndexPath,
		Index: New(),
	}
}
示例#5
0
// We pass our index instantiation function the data file that we will be
// creating an index to, the node type, and the format of the subset node
// index (if the node is of type subset, otherwise snFomrat == "")
func NewChunkRecordIndexer(f *os.File, nType string, snFormat string, snRecordIndexPath string) Indexer {
	fi, _ := f.Stat()
	return &chunkRecord{
		f:     f,
		r:     multi.NewReader(f),
		t:     nType,
		snf:   snFormat,
		snrp:  snRecordIndexPath,
		Index: New(),
		size:  fi.Size(),
	}
}