-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Use Template Haskell to embed (LZMA compressed) data.
--   
--   The <tt>file-embed</tt> package let's embed file and dir contents.
--   
--   This package is similar, but also compresses the embedded contents
--   with LZMA. That makes resulting object files smaller, at the cost of
--   start up decompression.
--   
--   There's also an <a>embedRecursiveDir</a> function.
@package file-embed-lzma
@version 0


module FileEmbedLzma

-- | Embed a strict <a>ByteString</a> from a file.
embedByteString :: FilePath -> Q Exp

-- | Embed a lazy <a>ByteString</a> from a file.
embedLazyByteString :: FilePath -> Q Exp

-- | Embed a strict <a>Text</a> from a UTF8-encoded file.
embedText :: FilePath -> Q Exp

-- | Embed a lazy <a>Text</a> from a UTF8-encoded file.
embedLazyText :: FilePath -> Q Exp

-- | Embed a <tt>[(<a>FilePath</a>, <a>ByteString</a>)]</tt> list,
--   traversing given directory.
embedDir :: FilePath -> Q Exp

-- | Embed a <tt>[(<a>FilePath</a>, <a>ByteString</a>)]</tt> list,
--   recursively traversing given directory path.
--   
--   For example, with <tt>wai-static-app</tt> this can be used as:
--   
--   <pre>
--   staticApp $ embeddedSettings $(<a>embedRecursiveDir</a> "static")
--   -- is an embedded (no data-files!) equivalent of
--   staticApp $ defaultFileServerSettings "static"
--   </pre>
embedRecursiveDir :: FilePath -> Q Exp
listDirectoryFiles :: FilePath -> IO [(FilePath, ByteString)]
listRecursiveDirectoryFiles :: FilePath -> IO [(FilePath, ByteString)]
listDirectoryFilesF :: (FilePath -> IO [(FilePath, ByteString)]) -> FilePath -> IO [(FilePath, ByteString)]

-- | Makes lazy <a>ByteString</a> expression. Embedded value is compressed
--   with LZMA.
lazyBytestringE :: ByteString -> Q Exp
