MCPcopy
hub / github.com/klauspost/compress / testCreateZipReader

Function testCreateZipReader

zstd/seqdec_test.go:571–585  ·  view source on GitHub ↗
(path string, tb testing.TB)

Source from the content-addressed store, hash-verified

569}
570
571func testCreateZipReader(path string, tb testing.TB) *zip.Reader {
572 failOnError := func(err error) {
573 if err != nil {
574 tb.Fatal(err)
575 }
576 }
577
578 data, err := os.ReadFile(path)
579 failOnError(err)
580
581 zr, err := zip.NewReader(bytes.NewReader(data), int64(len(data)))
582 failOnError(err)
583
584 return zr
585}

Callers 15

TestHeader_DecodeFunction · 0.85
FuzzEncodingFunction · 0.85
TestDecoder_SmallDictFunction · 0.85
TestEncoder_SmallDictFunction · 0.85
Test_seqdec_decoderFunction · 0.85
Test_seqdec_executeFunction · 0.85
Test_seqdec_decodeSyncFunction · 0.85
benchmark_seqdec_decodeFunction · 0.85
Benchmark_seqdec_executeFunction · 0.85

Calls 2

NewReaderFunction · 0.92
FatalMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…