Allow to build zlib and lzma statically
This should fix issues on Darwin.
This commit is contained in:
6
3rdparty/zlib/examples/gunzip.hs
vendored
Normal file
6
3rdparty/zlib/examples/gunzip.hs
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
module Main where
|
||||
|
||||
import qualified Data.ByteString.Lazy as B
|
||||
import qualified Codec.Compression.GZip as GZip
|
||||
|
||||
main = B.interact GZip.decompress
|
||||
8
3rdparty/zlib/examples/gzip.hs
vendored
Normal file
8
3rdparty/zlib/examples/gzip.hs
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
module Main where
|
||||
|
||||
import qualified Data.ByteString.Lazy as B
|
||||
import qualified Codec.Compression.GZip as GZip
|
||||
|
||||
main = B.interact $ GZip.compressWith GZip.defaultCompressParams {
|
||||
GZip.compressLevel = GZip.BestCompression
|
||||
}
|
||||
13
3rdparty/zlib/examples/zpipe.hs
vendored
Normal file
13
3rdparty/zlib/examples/zpipe.hs
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
module Main where
|
||||
|
||||
import System.Environment
|
||||
|
||||
import qualified Data.ByteString.Lazy as B
|
||||
import qualified Codec.Compression.Zlib as Zlib
|
||||
|
||||
main = do args <- getArgs
|
||||
case args of
|
||||
[] -> B.interact Zlib.compress
|
||||
["-d"] -> B.interact Zlib.decompress
|
||||
_ -> do name <- getProgName
|
||||
error $ "usage: " ++ name ++ " [-d] < source > dest"
|
||||
Reference in New Issue
Block a user