MCPcopy Index your code
hub / github.com/klauspost/compress / Write

Method Write

zstd/encoder.go:203–212  ·  view source on GitHub ↗

Write data to the encoder. Input data will be buffered and as the buffer fills up content will be compressed and written to the output. When done writing, use Close to flush the remaining output and write CRC if requested.

(p []byte)

Source from the content-addressed store, hash-verified

201// When done writing, use Close to flush the remaining output
202// and write CRC if requested.
203func (e *Encoder) Write(p []byte) (n int, err error) {
204 s := &e.state
205 if s.eofWritten {
206 return 0, ErrEncoderClosed
207 }
208 if e.o.concurrentBlocks {
209 return e.writeJobs(p)
210 }
211 return e.writeBlocks(p)
212}
213
214func (e *Encoder) writeJobs(p []byte) (n int, err error) {
215 s := &e.state

Callers

nothing calls this directly

Calls 2

writeJobsMethod · 0.95
writeBlocksMethod · 0.95

Tested by

no test coverage detected