MCPcopy
hub / github.com/go-git/go-git / zlibCompress

Function zlibCompress

plumbing/format/packfile/internal_test.go:131–140  ·  view source on GitHub ↗
(t *testing.T, content []byte)

Source from the content-addressed store, hash-verified

129}
130
131func zlibCompress(t *testing.T, content []byte) []byte {
132 t.Helper()
133
134 var compressed bytes.Buffer
135 zw := zlib.NewWriter(&compressed)
136 _, err := zw.Write(content)
137 require.NoError(t, err)
138 require.NoError(t, zw.Close())
139 return compressed.Bytes()
140}

Callers 1

buildTestPackFunction · 0.85

Calls 3

WriteMethod · 0.95
CloseMethod · 0.95
BytesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…