shithub: furgit

Download patch

ref: 6be32e9cf14a43cf6fb78a29943cb3b0e3d276b2
parent: 777db8470909b16411cb54a6c0bbf927be778952
author: Runxi Yu <me@runxiyu.org>
date: Sat Feb 21 18:21:32 EST 2026

internal/zlib: Use klauspost/compress/flate for now...

--- a/go.mod
+++ b/go.mod
@@ -1,3 +1,5 @@
 module codeberg.org/lindenii/furgit
 
 go 1.25.0
+
+require github.com/klauspost/compress v1.18.4
--- /dev/null
+++ b/go.sum
@@ -1,0 +1,2 @@
+github.com/klauspost/compress v1.18.4 h1:RPhnKRAQ4Fh8zU2FY/6ZFDwTVTxgJ/EMydqSTzE9a2c=
+github.com/klauspost/compress v1.18.4/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=
--- a/internal/zlib/reader.go
+++ b/internal/zlib/reader.go
@@ -35,7 +35,6 @@
 
 import (
 	"bufio"
-	"compress/flate"
 	"encoding/binary"
 	"errors"
 	"hash"
@@ -42,6 +41,8 @@
 	"hash/adler32"
 	"io"
 	"sync"
+
+	"github.com/klauspost/compress/flate"
 )
 
 const (
--- a/internal/zlib/writer.go
+++ b/internal/zlib/writer.go
@@ -5,7 +5,6 @@
 package zlib
 
 import (
-	"compress/flate"
 	"encoding/binary"
 	"fmt"
 	"hash"
@@ -12,6 +11,8 @@
 	"hash/adler32"
 	"io"
 	"sync"
+
+	"github.com/klauspost/compress/flate"
 )
 
 // These constants are copied from the [flate] package, so that code that imports
--