mirror of
https://github.com/netbirdio/netbird.git
synced 2026-05-19 23:29:56 +00:00
Drop unused zlibState.scratch field
This commit is contained in:
@@ -602,14 +602,11 @@ func sampledColorCountInto(seen map[uint32]struct{}, img *image.RGBA, x, y, w, h
|
|||||||
return len(seen)
|
return len(seen)
|
||||||
}
|
}
|
||||||
|
|
||||||
// zlibState holds the persistent zlib writer, output buffer, and a scratch
|
// zlibState holds the persistent zlib writer and its output buffer, reused
|
||||||
// slice reused by encodeZlibRect to stage the packed pixel stream before
|
// across rects so steady-state Tight encoding stays alloc-free.
|
||||||
// handing it to the deflate writer. The scratch grows to the largest rect
|
|
||||||
// we've seen and is kept for the session lifetime.
|
|
||||||
type zlibState struct {
|
type zlibState struct {
|
||||||
buf *bytes.Buffer
|
buf *bytes.Buffer
|
||||||
w *zlib.Writer
|
w *zlib.Writer
|
||||||
scratch []byte
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func newZlibState() *zlibState {
|
func newZlibState() *zlibState {
|
||||||
|
|||||||
Reference in New Issue
Block a user