diff --git a/library/Potoki/Core/Fetch.hs b/library/Potoki/Core/Fetch.hs
--- a/library/Potoki/Core/Fetch.hs
+++ b/library/Potoki/Core/Fetch.hs
@@ -1,6 +1,8 @@
 module Potoki.Core.Fetch where
 
 import Potoki.Core.Prelude
+import qualified Data.ByteString.Lazy as A
+import qualified Data.ByteString.Lazy.Internal as A
 
 
 {-|
@@ -140,3 +142,15 @@
 ioMaybe :: IO (Maybe a) -> Fetch a
 ioMaybe io =
   Fetch $ \nil just -> maybe nil just <$> io
+
+{-# INLINE lazyByteStringRef #-}
+lazyByteStringRef :: IORef A.ByteString -> Fetch ByteString
+lazyByteStringRef ref =
+  Fetch $ \ nil just ->
+  do
+    lazyByteString <- readIORef ref
+    case lazyByteString of
+      A.Chunk chunk remainders -> do
+        writeIORef ref remainders
+        return (just chunk)
+      A.Empty -> return nil
diff --git a/library/Potoki/Core/Prelude.hs b/library/Potoki/Core/Prelude.hs
--- a/library/Potoki/Core/Prelude.hs
+++ b/library/Potoki/Core/Prelude.hs
@@ -68,6 +68,10 @@
 import Text.Read as Exports (Read(..), readMaybe, readEither)
 import Unsafe.Coerce as Exports
 
+-- bytestring
+-------------------------
+import Data.ByteString as Exports (ByteString)
+
 -- profunctors
 -------------------------
 import Data.Profunctor.Unsafe as Exports
diff --git a/library/Potoki/Core/Produce.hs b/library/Potoki/Core/Produce.hs
--- a/library/Potoki/Core/Produce.hs
+++ b/library/Potoki/Core/Produce.hs
@@ -3,6 +3,7 @@
 import Potoki.Core.Prelude
 import qualified Potoki.Core.Fetch as A
 import qualified Potoki.Core.Transform.Types as B
+import qualified Data.ByteString.Lazy as C
 
 
 {-|
@@ -47,3 +48,10 @@
     (fetch, kill) <- produceIO
     newFetch <- transformIO fetch
     return (newFetch, kill)
+
+{-# INLINE lazyByteString #-}
+lazyByteString :: C.ByteString -> Produce ByteString
+lazyByteString lbs =
+  Produce $ do
+    ref <- newIORef lbs
+    return (A.lazyByteStringRef ref, return ())
diff --git a/potoki-core.cabal b/potoki-core.cabal
--- a/potoki-core.cabal
+++ b/potoki-core.cabal
@@ -1,7 +1,7 @@
 name:
   potoki-core
 version:
-  1.5.2
+  1.5.3
 synopsis:
   Low-level components of "potoki"
 description:
@@ -54,6 +54,7 @@
   build-depends:
     -- 
     stm >=2.4 && <3,
+    bytestring >=0.10 && <0.11,
     -- 
     profunctors >=5.2 && <6,
     base >=4.7 && <5
