aboutsummaryrefslogtreecommitdiff
path: root/internal/flatex/decompress_bytes.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2025-11-25 08:00:00 +0800
committerGravatar Runxi Yu2025-11-25 08:00:00 +0800
commit84e32bfc60150fdd216166606966d6ebebbf3ac7 (patch)
treeff4c55ae80adbf23ebec79c7c70c180c11dd618f /internal/flatex/decompress_bytes.go
parentzlibx: Remove unused cruft (diff)
signatureNo signature
flatex: Remove unused cruft
Diffstat (limited to 'internal/flatex/decompress_bytes.go')
-rw-r--r--internal/flatex/decompress_bytes.go13
1 files changed, 6 insertions, 7 deletions
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)