strict bytestring encoders and decoders
Only had lazy ones before. Already sped up a few parts of the code.
This commit is contained in:
parent
9cc6d5549b
commit
b3c69eaaf8
14 changed files with 41 additions and 25 deletions
|
@ -350,7 +350,7 @@ btshowmetainfo torrent field =
|
|||
torrentFileSizes :: FilePath -> IO [(FilePath, Integer)]
|
||||
torrentFileSizes torrent = do
|
||||
#ifdef WITH_TORRENTPARSER
|
||||
let mkfile = joinPath . map (scrub . decodeBS)
|
||||
let mkfile = joinPath . map (scrub . decodeBL)
|
||||
b <- B.readFile torrent
|
||||
return $ case readTorrent b of
|
||||
Left e -> giveup $ "failed to parse torrent: " ++ e
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue