diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,6 @@
+# warc
+
+## 1.0.5
+
+* Compatibility with GHC 9.2
+
diff --git a/WarcExport.hs b/WarcExport.hs
--- a/WarcExport.hs
+++ b/WarcExport.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE OverloadedStrings #-}
 
 import Data.List (isSuffixOf)
@@ -14,10 +15,12 @@
 import Data.Text.Lens
 import Pipes hiding (each)
 import qualified Pipes.ByteString as PBS
-import qualified Pipes.GZip as GZip
 import qualified Pipes.Prelude as PP
 import Data.Warc
 import Options.Applicative as O hiding (header, action)
+#ifdef WITH_GZIP
+import qualified Pipes.GZip as GZip
+#endif
 
 withFileProducer :: (MonadIO m, MonadMask m)
                  => FilePath
@@ -25,7 +28,9 @@
                  -> m a
 withFileProducer path action = bracket (liftIO $ openFile path ReadMode) (liftIO . hClose) $ \h ->
     let prod
+#ifdef WITH_GZIP
           | ".gz" `isSuffixOf` path = hoist liftIO $ GZip.decompress $ PBS.fromHandle h
+#endif
           | otherwise               = PBS.fromHandle h
     in action prod
 
diff --git a/src/Data/Warc.hs b/src/Data/Warc.hs
--- a/src/Data/Warc.hs
+++ b/src/Data/Warc.hs
@@ -61,7 +61,7 @@
 import Control.Lens
 import qualified Pipes.Attoparsec as PA
 import qualified Data.ByteString as BS
-import qualified Data.ByteString.Lazy.Builder as BB
+import qualified Data.ByteString.Builder as BB
 import Data.ByteString (ByteString)
 import Control.Monad (join)
 import Control.Monad.Trans.Free
diff --git a/src/Data/Warc/Header.hs b/src/Data/Warc/Header.hs
--- a/src/Data/Warc/Header.hs
+++ b/src/Data/Warc/Header.hs
@@ -69,7 +69,7 @@
 import Data.ByteString.Char8 (ByteString)
 import qualified Data.ByteString.Char8 as BS
 import qualified Data.ByteString.Lazy as BSL
-import qualified Data.ByteString.Lazy.Builder as BB
+import qualified Data.ByteString.Builder as BB
 
 import Control.Lens
 
diff --git a/warc.cabal b/warc.cabal
--- a/warc.cabal
+++ b/warc.cabal
@@ -1,5 +1,5 @@
 name:                warc
-version:             1.0.4
+version:             1.0.5
 synopsis:            A parser for the Web Archive (WARC) format
 description:         A streaming parser for the Web Archive (WARC) format.
 homepage:            http://github.com/bgamari/warc
@@ -10,9 +10,16 @@
 copyright:           (c) 2015 Ben Gamari
 category:            Data
 build-type:          Simple
-tested-with:         GHC ==7.10.3, GHC ==8.0.2, GHC ==8.2.2, GHC ==8.4.1
+tested-with:         GHC ==8.0.2, GHC ==8.2.2, GHC ==8.4.1, GHC ==8.6.1, GHC == 8.8.1, GHC ==8.10.7, GHC==9.0.2, GHC ==9.2.1
 cabal-version:       >=1.10
+extra-source-files:  CHANGELOG.md
 
+flag gzip
+  description:         Include support in the warc-export executable for
+                       transparent decompression of gzip archives.
+  manual:              True
+  default:             False
+
 source-repository head
   type:                git
   location:            git://github.com/bgamari/warc
@@ -21,21 +28,21 @@
   exposed-modules:     Data.Warc, Data.Warc.Header
   other-extensions:    RankNTypes, OverloadedStrings, TemplateHaskell
   hs-source-dirs:      src
-  build-depends:       base >=4.8 && <4.12,
+  build-depends:       base >=4.8 && <4.17,
                        pipes >=4.1 && <4.4,
-                       attoparsec >=0.12 && <0.14,
+                       attoparsec >=0.12 && <0.15,
                        unordered-containers >=0.2 && <0.3,
-                       hashable >=1.2 && <1.3,
-                       bytestring >=0.10 && <0.11,
+                       hashable >=1.2 && <1.5,
+                       bytestring >=0.10 && <0.12,
                        pipes-bytestring >=2.1 && <2.2,
-                       transformers >=0.4 && <0.6,
-                       lens >=4.7 && <4.18,
+                       transformers >=0.4 && <0.7,
+                       lens >=4.7 && <5.2,
                        pipes-attoparsec >=0.5 && <0.6,
                        free >=4.10 && <5.2,
                        errors >=1.4 && <3.0,
-                       time >=1.5 && <1.10,
-                       text >=1.2 && <1.3,
-                       mmorph >= 1.0 && <1.2
+                       time >=1.5 && <1.14,
+                       text >=1.2 && <2.1,
+                       mmorph >= 1.0 && <1.3
   default-language:    Haskell2010
 
 executable warc-export
@@ -45,8 +52,7 @@
                        warc,
                        filepath,
                        exceptions,
-                       pipes-zlib,
-                       optparse-applicative >= 0.12 && < 0.15,
+                       optparse-applicative >= 0.12 && < 0.17,
                        pipes,
                        attoparsec,
                        bytestring,
@@ -58,4 +64,7 @@
                        errors,
                        time,
                        text
+  if flag(gzip)
+    cpp-options:       -DWITH_GZIP
+    build-depends:     pipes-zlib
   default-language:    Haskell2010
