diff --git a/library/Potoki/Cereal/Consume.hs b/library/Potoki/Cereal/Consume.hs
--- a/library/Potoki/Cereal/Consume.hs
+++ b/library/Potoki/Cereal/Consume.hs
@@ -1,15 +1,25 @@
 module Potoki.Cereal.Consume
-(
-  encodeToFile,
-)
 where
 
 import Potoki.Cereal.Prelude
-import Potoki.Consume
-import Potoki.Core.Transform
-import qualified Potoki.Cereal.Transform as D
-import qualified Data.Serialize as C
+import Potoki.Core.Consume
+import Data.Serialize
+import qualified Potoki.Core.Fetch as E
 
 
-encodeToFile :: C.Serialize a => FilePath -> Consume a (Either IOException ())
-encodeToFile = transform D.encode . writeBytesToFile
+get :: Get a -> Consume ByteString (Either String a)
+get get =
+  Consume $ \ (E.Fetch fetchIO) ->
+  let
+    loop decodeChunk =
+      let
+        none = case decodeChunk "" of
+          Done result _ -> return (Right result)
+          Fail error _ -> return (Left (fromString error))
+          _ -> return (Left "Not enough data")
+        some chunk = case decodeChunk chunk of
+          Partial newDecodeChunk -> loop newDecodeChunk
+          Done result _ -> return (Right result)
+          Fail error _ -> return (Left (fromString error))
+        in join (fetchIO none some)
+    in loop (runGetPartial get)
diff --git a/library/Potoki/Cereal/Produce.hs b/library/Potoki/Cereal/Produce.hs
--- a/library/Potoki/Cereal/Produce.hs
+++ b/library/Potoki/Cereal/Produce.hs
@@ -1,22 +1,13 @@
 module Potoki.Cereal.Produce
-(
-  fileDecoded,
-  directoryDecoded,
-)
 where
 
 import Potoki.Cereal.Prelude
-import Potoki.Produce
-import Potoki.Core.Transform
-import qualified Potoki.Cereal.Transform as D
-import qualified Data.Serialize as C
+import Potoki.Core.Produce
+import Data.Serialize
+import qualified Data.ByteString.Lazy as A
+import qualified Data.ByteString.Lazy.Internal as A
 
 
-fileDecoded :: C.Serialize a => FilePath -> Produce (Either IOException (Either Text a))
-fileDecoded = transform (right D.decode) . fileBytes
-
-directoryDecoded :: C.Serialize a => FilePath -> Produce (Either IOException (Either Text a))
-directoryDecoded dirPath =
-  transform
-    (right (produce fileDecoded) >>^ join)
-    (directoryContents dirPath)
+put :: Put -> Produce ByteString
+put =
+  lazyByteString . runPutLazy
diff --git a/library/Potoki/Cereal/Transform.hs b/library/Potoki/Cereal/Transform.hs
deleted file mode 100644
--- a/library/Potoki/Cereal/Transform.hs
+++ /dev/null
@@ -1,74 +0,0 @@
-module Potoki.Cereal.Transform
-(
-  encode,
-  decode,
-)
-where
-
-import Potoki.Cereal.Prelude
-import Potoki.Core.Transform
-import qualified Potoki.Core.Fetch as A
-import qualified Data.Serialize as C
-
-
-encode :: C.Serialize element => Transform element ByteString
-encode =
-  arr C.encode
-
-decode :: C.Serialize element => Transform ByteString (Either Text element)
-decode =
-  runPartialDecoder (C.runGetPartial C.get)
-
-{-# INLINE runPartialDecoder #-}
-runPartialDecoder :: forall decoded. (ByteString -> C.Result decoded) -> Transform ByteString (Either Text decoded)
-runPartialDecoder inputToResult =
-  Transform $ \ inputFetch ->
-  do
-    unconsumedRef <- newIORef mempty
-    finishedRef <- newIORef False
-    return (A.Fetch (fetchParsed inputFetch finishedRef unconsumedRef))
-  where
-    fetchParsed :: A.Fetch ByteString -> IORef Bool -> IORef ByteString -> forall x. x -> (Either Text decoded -> x) -> IO x
-    fetchParsed (A.Fetch inputFetchIO) finishedRef unconsumedRef nil just =
-      do
-        finished <- readIORef finishedRef
-        if finished
-          then return nil
-          else do
-            unconsumed <- readIORef unconsumedRef
-            if unconsumed == mempty
-              then
-                join $ inputFetchIO
-                  (return nil)
-                  (\ input -> do
-                    if input == mempty
-                      then return nil
-                      else matchResult (inputToResult input))
-              else do
-                writeIORef unconsumedRef mempty
-                matchResult (inputToResult unconsumed)
-      where
-        matchResult =
-          \ case
-            C.Partial inputToResult ->
-              consume inputToResult
-            C.Done decoded unconsumed ->
-              do
-                writeIORef unconsumedRef unconsumed
-                return (just (Right decoded))
-            C.Fail message unconsumed ->
-              do
-                writeIORef unconsumedRef unconsumed
-                writeIORef finishedRef True
-                return (just (Left resultMessage))
-              where
-                resultMessage =
-                  fromString message
-        consume inputToResult =
-          join $ inputFetchIO
-            (do
-              writeIORef finishedRef True
-              matchResult (inputToResult mempty))
-            (\ input -> do
-              when (input == mempty) (writeIORef finishedRef True)
-              matchResult (inputToResult input))
diff --git a/potoki-cereal.cabal b/potoki-cereal.cabal
--- a/potoki-cereal.cabal
+++ b/potoki-cereal.cabal
@@ -1,7 +1,7 @@
 name:
   potoki-cereal
 version:
-  0.1.6
+  0.2
 synopsis:
   Streaming serialization
 category:
@@ -41,7 +41,6 @@
   exposed-modules:
     Potoki.Cereal.Consume
     Potoki.Cereal.Produce
-    Potoki.Cereal.Transform
   other-modules:
     Potoki.Cereal.Prelude
   build-depends:
@@ -49,6 +48,5 @@
     base-prelude >=1 && <2,
     bytestring >=0.10 && <0.11,
     cereal >=0.5 && <0.6,
-    potoki >=0.11 && <0.12,
-    potoki-core >=1.5 && <1.6,
+    potoki-core >=1.5.3 && <1.6,
     text >=1 && <2
