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

Function NewBufferedWriter

internal/snapref/encode.go:137–143  ·  view source on GitHub ↗

NewBufferedWriter returns a new Writer that compresses to w, using the framing format described at https://github.com/google/snappy/blob/master/framing_format.txt The Writer returned buffers writes. Users must call Close to guarantee all data has been forwarded to the underlying io.Writer. They may

(w io.Writer)

Source from the content-addressed store, hash-verified

135// data has been forwarded to the underlying io.Writer. They may also call
136// Flush zero or more times before calling Close.
137func NewBufferedWriter(w io.Writer) *Writer {
138 return &Writer{
139 w: w,
140 ibuf: make([]byte, 0, maxBlockSize),
141 obuf: make([]byte, obufLen),
142 }
143}
144
145// Writer is an io.Writer that can write Snappy-compressed bytes.
146//

Callers 1

testSnappyDecodeFunction · 0.92

Calls

no outgoing calls

Tested by 1

testSnappyDecodeFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…