diff --git a/Text/Search/Sphinx/Get.hs b/Text/Search/Sphinx/Get.hs
new file mode 100644
--- /dev/null
+++ b/Text/Search/Sphinx/Get.hs
@@ -0,0 +1,62 @@
+module Text.Search.Sphinx.Get where
+
+import Data.Binary.Get
+import Data.Int (Int64)
+import Prelude hiding (readList)
+import Data.ByteString.Lazy hiding (pack, length, map, groupBy)
+import Control.Monad
+import Text.Search.Sphinx.Types
+
+-- Utility functions
+getNum :: Get Int
+getNum = getWord32be >>= return . fromEnum
+
+getNum64 :: Get Int64
+getNum64 = getWord64be >>= return . fromIntegral
+
+getNums = readList getNum
+readList f = do num <- getNum
+                num `times` f
+times = replicateM
+readField = readStr
+readStr = do len <- getNum
+             getLazyByteString (fromIntegral len)
+
+
+getResult :: Get SearchResult
+getResult = do
+    status     <- getNum
+    -- todo: we suppose the status is OK
+    fields     <- readList readField
+    attrs      <- readList readAttr
+    matchCount <- getNum
+    id64       <- getNum
+    matches    <- matchCount `times` readMatch (id64 > 0) (map snd attrs)
+    [total, totalFound, time, numWords] <- 4 `times` getNum
+    wrds       <- numWords `times` readWord
+    return (SearchResult matches total totalFound wrds)
+
+
+readWord = do s <- readStr
+              [doc, hits] <- 2 `times` getNum
+              return (s, doc, hits)
+
+readMatch isId64 attrs = do
+    doc <- if isId64 then getNum64 else (getNum >>= return . fromIntegral)
+    weight <- getNum
+    matchAttrs <- mapM readMatchAttr attrs
+    return $ Match doc weight matchAttrs
+
+readMatchAttr AttrTFloat  = error "readMatchAttr for AttrFloat not implemented yet."
+readMatchAttr AttrTMulti  = getNums >>= return . AttrMulti
+readMatchAttr _           = getNum  >>= return . AttrNum
+
+readAttr = do
+    s <- readStr
+    t <- getNum
+    return (s, toEnum t)
+
+readHeader = runGet $ do status  <- getWord16be
+                         version <- getWord16be
+                         length  <- getWord32be
+                         return (status, version, length)
diff --git a/Text/Search/Sphinx/Put.hs b/Text/Search/Sphinx/Put.hs
new file mode 100644
--- /dev/null
+++ b/Text/Search/Sphinx/Put.hs
@@ -0,0 +1,31 @@
+module Text.Search.Sphinx.Put where
+
+import Data.Binary.Put
+import Data.ByteString.Lazy hiding (pack, length, map, groupBy)
+import Data.ByteString.Lazy.Char8 (pack)
+import qualified Data.ByteString.Lazy as BS
+import qualified Text.Search.Sphinx.Types as T
+
+num = putWord32be . toEnum
+num64 = putWord64be . toEnum
+enum :: Enum a => a -> Put
+enum = num . fromEnum
+numList ls = do num (length ls)
+                mapM_ num ls
+nums cfg   = mapM_ (\x -> num $ x cfg)
+num64s cfg = mapM_ (\x -> num64 $ x cfg)
+
+stringIntList :: [(String, Int)] -> Put
+stringIntList xs = num (length xs) >> mapM_ strInt xs
+ where strInt (s,i) = str s >> num i
+
+str :: String -> Put
+str s = do let bs = pack s
+           num (fromEnum $ BS.length bs)
+           putLazyByteString bs
+
+cmd :: T.SearchdCommand -> Put
+cmd = putWord16be . toEnum . T.searchdCommand
+
+verCmd :: T.VerCommand -> Put
+verCmd = putWord16be . toEnum . T.verCommand
diff --git a/sphinx.cabal b/sphinx.cabal
--- a/sphinx.cabal
+++ b/sphinx.cabal
@@ -1,5 +1,5 @@
 Name:            sphinx
-Version:         0.1
+Version:         0.1.1
 Synopsis:        Haskell bindings to the Sphinx full-text searching deamon.
 Description:     Haskell bindings to the Sphinx full-text searching deamon. This
                  module is heavily inspired by the php and python client.
@@ -10,5 +10,6 @@
 Author:          Tupil
 Maintainer:      Chris Eidhof <ce+sphinx@tupil.com>
 Exposed-Modules: Text.Search.Sphinx, Text.Search.Sphinx.Types, Text.Search.Sphinx.Configuration
+Other-Modules:   Text.Search.Sphinx.Get, Text.Search.Sphinx.Put
 Build-Type:      Simple
 Build-Depends:   base, binary, bytestring, network, haskell98
