Bryan O'Sullivan avatar Bryan O'Sullivan committed fac3198

Fix up docs and imports.

Comments (0)

Files changed (1)

Codec/Compression/Snappy/Lazy.hsc

 -- Stability:   experimental
 -- Portability: portable
 --
--- This module provides fast, pure compression and decompression
--- of Snappy data.
+-- This module provides fast, pure zero-copy compression and
+-- decompression of lazy 'ByteString' data using the Snappy format.
+--
+-- Although these functions operate on lazy 'ByteString's, they
+-- consume the data /strictly/: they do not produce any output until
+-- they have consumed all of the input, and they produce the output in
+-- a single large chunk.
+--
+-- If your data is already in the form of a lazy 'ByteString', it is
+-- likely more efficient to use these functions than to convert your
+-- data to and from strict ByteStrings, as you can avoid the
+-- additional allocation and copying that would entail.
 
 module Codec.Compression.Snappy.Lazy
     (
 #include "hs_snappy.h"
 
 import Codec.Compression.Snappy.Internal (maxCompressedLength)
+import Data.ByteString.Internal hiding (ByteString)
+import Data.ByteString.Lazy.Internal (ByteString(..))
+import Data.Word (Word8)
+import Foreign.C.Types (CInt, CSize)
+import Foreign.ForeignPtr (touchForeignPtr, withForeignPtr)
+import Foreign.Marshal.Array (withArray)
+import Foreign.Marshal.Utils (with)
+import Foreign.Ptr (Ptr, plusPtr)
+import Foreign.Storable (Storable(..))
+import System.IO.Unsafe (unsafePerformIO)
 import qualified Codec.Compression.Snappy as S
-import Data.ByteString.Lazy.Internal
+import qualified Data.ByteString as B
 import qualified Data.ByteString.Lazy as L
-import Data.Word (Word8)
-import Data.ByteString.Internal hiding (ByteString)
-import qualified Data.ByteString as B
-import Foreign.C.Types (CInt, CSize)
-import Foreign.Storable
-import Foreign.Ptr (Ptr, plusPtr)
-import Foreign.ForeignPtr (withForeignPtr)
-import System.IO.Unsafe (unsafePerformIO)
-import Foreign.Marshal.Array
-import Foreign.Marshal.Utils
 
 newtype BS = BS B.ByteString
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.