aboutsummaryrefslogtreecommitdiff
path: root/internal/flatex/decompress_bytes.go
diff options
context:
space:
mode:
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)