packages feed

snappy-conduit (empty) → 0.1.0.0

raw patch · 6 files changed

+108/−0 lines, 6 filesdep +basedep +bytestringdep +conduitsetup-changed

Dependencies added: base, bytestring, conduit, snappy

Files

+ LICENSE view
@@ -0,0 +1,20 @@+Copyright (c) 2015 Toru Tomita++Permission is hereby granted, free of charge, to any person obtaining+a copy of this software and associated documentation files (the+"Software"), to deal in the Software without restriction, including+without limitation the rights to use, copy, modify, merge, publish,+distribute, sublicense, and/or sell copies of the Software, and to+permit persons to whom the Software is furnished to do so, subject to+the following conditions:++The above copyright notice and this permission notice shall be included+in all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ README.md view
@@ -0,0 +1,9 @@+# snappy-conduit++Conduit bindings for snappy++Authors+-------++This library is written and maintained by Toru Tomita,+<toru.tomita@gmail.com>.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ snappy-conduit.cabal view
@@ -0,0 +1,35 @@+-- Initial snappy-conduit.cabal generated by cabal init.  For further +-- documentation, see http://haskell.org/cabal/users-guide/++name:                snappy-conduit+version:             0.1.0.0+synopsis:            Conduit bindings for Snappy (see snappy package)+description:         Conduit bindings for Snappy (see snappy package)+license:             MIT+license-file:        LICENSE+author:              Toru Tomita+maintainer:          toru.tomita@gmail.com+copyright:           Copyright (c) 2015, Toru Tomita+category:            Codec+Homepage:            http://github.com/tatac1/snappy-conduit/+bug-reports:         http://github.com/tatac1/snappy-conduit/issues+build-type:          Simple+extra-source-files:  README.md+cabal-version:       >=1.10++library+  exposed-modules:   Codec.Compression.Snappy.Conduit+                   , Codec.Compression.Snappy.Lazy.Conduit   +  -- other-modules:       +  -- other-extensions:    +  build-depends:       base >=4.7 && <4.8+                     , snappy >= 0.2+                     , conduit >= 1.0+                     , bytestring >= 0.10+  hs-source-dirs:      src+  default-language:    Haskell2010+  ghc-options:         -Wall++source-repository head+  type:     git+  location: http://github.com/tatac1/snappy-conduit
+ src/Codec/Compression/Snappy/Conduit.hs view
@@ -0,0 +1,21 @@+module Codec.Compression.Snappy.Conduit (+    -- * Conduit interface+      decompressConduit+    , compressConduit+    ) where+++import           Codec.Compression.Snappy (compress, decompress)+import           Data.ByteString.Char8    (ByteString)+import           Data.Conduit+import qualified Data.Conduit.List        as CL++-- | Compress data into the Snappy format.+decompressConduit :: Monad m => Conduit ByteString m ByteString+decompressConduit = CL.map decompress++-- | Decompress data in the Snappy format.+-- If the input is not compressed or is corrupt, an exception will be thrown.+compressConduit :: Monad m => Conduit ByteString m ByteString+compressConduit = CL.map compress+
+ src/Codec/Compression/Snappy/Lazy/Conduit.hs view
@@ -0,0 +1,21 @@+module Codec.Compression.Snappy.Lazy.Conduit (+    -- * Conduit interface+      decompressConduit+    , compressConduit+    ) where+++import           Codec.Compression.Snappy.Lazy (compress, decompress)+import           Data.ByteString.Lazy          (ByteString)+import           Data.Conduit+import qualified Data.Conduit.List             as CL++-- | Compress data into the Snappy format.+decompressConduit :: Monad m => Conduit ByteString m ByteString+decompressConduit = CL.map decompress++-- | Decompress data in the Snappy format.+-- If the input is not compressed or is corrupt, an exception will be thrown.+compressConduit :: Monad m => Conduit ByteString m ByteString+compressConduit = CL.map compress+