MCPcopy Index your code
hub / github.com/go-git/go-git / PutZlibReader

Function PutZlibReader

utils/sync/zlib.go:54–58  ·  view source on GitHub ↗

PutZlibReader puts z back into its sync.Pool, first closing the reader. The Byte slice dictionary is also put back into its sync.Pool.

(z ZLibReader)

Source from the content-addressed store, hash-verified

52// PutZlibReader puts z back into its sync.Pool, first closing the reader.
53// The Byte slice dictionary is also put back into its sync.Pool.
54func PutZlibReader(z ZLibReader) {
55 z.Reader.Close()
56 PutByteSlice(z.dict)
57 zlibReader.Put(z)
58}
59
60// GetZlibWriter returns a *zlib.Writer that is managed by a sync.Pool.
61// Returns a writer that is reset with w and ready for use.

Callers 5

asyncReaderFunction · 0.92
ReadObjectMethod · 0.92
copyObjectMethod · 0.92
CloseMethod · 0.92
TestGetAndPutZlibReaderFunction · 0.85

Calls 3

PutByteSliceFunction · 0.85
CloseMethod · 0.65
PutMethod · 0.65

Tested by 1

TestGetAndPutZlibReaderFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…