From 84e32bfc60150fdd216166606966d6ebebbf3ac7 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Tue, 25 Nov 2025 08:00:00 +0800 Subject: flatex: Remove unused cruft --- internal/flatex/decompress_bytes.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'internal/flatex/decompress_bytes.go') diff --git a/internal/flatex/decompress_bytes.go b/internal/flatex/decompress_bytes.go index 9f1ffcfd..45a8b834 100644 --- a/internal/flatex/decompress_bytes.go +++ b/internal/flatex/decompress_bytes.go @@ -14,17 +14,16 @@ type bufferDecompressor struct { var bufferDecompressorPool = sync.Pool{ New: func() any { fixedHuffmanDecoderInit() - d := &bufferDecompressor{} - d.inflater.bits = new([maxNumLit + maxNumDist]int) - d.inflater.codebits = new([numCodes]int) + d := &bufferDecompressor{ + inflater: sliceInflater{ + bits: new([maxNumLit + maxNumDist]int), + codebits: new([numCodes]int), + }, + } return d }, } -func Decompress(src []byte) (bufpool.Buffer, int, error) { - return DecompressSized(src, 0) -} - func DecompressSized(src []byte, sizeHint int) (bufpool.Buffer, int, error) { d := bufferDecompressorPool.Get().(*bufferDecompressor) defer bufferDecompressorPool.Put(d) -- cgit v1.3.1-10-gc9f91