MCPcopy
hub / github.com/google/mangle / NewSimpleColumnStoreFromGzipBytes

Function NewSimpleColumnStoreFromGzipBytes

factstore/simplecolumn.go:197–205  ·  view source on GitHub ↗

NewSimpleColumnStoreFromGzipBytes returns a new fact store backed by data that is a gzipped file in simplecolumn format.

(data []byte)

Source from the content-addressed store, hash-verified

195// NewSimpleColumnStoreFromGzipBytes returns a new fact store backed by data that is
196// a gzipped file in simplecolumn format.
197func NewSimpleColumnStoreFromGzipBytes(data []byte) (*SimpleColumnStore, error) {
198 return NewSimpleColumnStore(func() (io.ReadCloser, error) {
199 reader, err := gzip.NewReader(bytes.NewReader(data))
200 if err != nil {
201 return nil, err
202 }
203 return reader, nil
204 })
205}
206
207// NewSimpleColumnStore returns a new fact store backed by a simple column file.
208// The input closure is called immediately to parse the header.

Callers 1

TestGzipFunction · 0.85

Calls 1

NewSimpleColumnStoreFunction · 0.85

Tested by 1

TestGzipFunction · 0.68