summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2023-08-04 09:54:35 +1000
committerJustin Bedo <cu@cua0.org>2023-08-04 09:54:35 +1000
commitd7b951b388b36ee5764c24b7afd3fd277ddb1ccf (patch)
treecdab48057feb8280cd2d795a29a8f4e34bd87225
parentd7cdea2dd784d5bd5e0acb5766656e77da285049 (diff)
prefer speed to compression
-rw-r--r--Data/FastQ.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Data/FastQ.hs b/Data/FastQ.hs
index 850ac5c..8309c97 100644
--- a/Data/FastQ.hs
+++ b/Data/FastQ.hs
@@ -63,7 +63,7 @@ parse l r =
unparse :: FilePath -> FilePath -> Stream IO ReadPair -> IO ()
unparse l r str = do
- (compress -> left, compress -> right) <- fmap unparse' str & toLazyBS
+ (compress' -> left, compress' -> right) <- fmap unparse' str & toLazyBS
lh <- openFile l WriteMode
rh <- openFile r WriteMode
writeFiles lh rh left right
@@ -84,3 +84,5 @@ unparse l r str = do
toLazyBS :: Stream IO (ByteString, ByteString) -> IO (BSL.ByteString, BSL.ByteString)
toLazyBS =
S.foldrM (\(l, r) b -> bimap (BSL.chunk ("@" <> l)) (BSL.chunk ("@" <> r)) <$> unsafeInterleaveIO b) (pure (BSL.Empty, BSL.Empty))
+
+ compress' = compressWith (defaultCompressParams {compressLevel = bestSpeed})