outsort: External sorting package based on Conduit

[ algorithms, mit, program ] [ Propose Tags ]

External (disk-backed) sorting package based on Conduit, saving intermediate files to disk and later merging them all.


[Skip to Readme]
Versions [faq] 0.1.0
Change log ChangeLog
Dependencies async, base (>=4.7 && <5), bytestring, conduit, conduit-algorithms, conduit-combinators, conduit-extra, containers, deepseq, directory, exceptions, filemanip, filepath, MissingH, primitive, resourcet, safe, safeio, temporary, text, transformers, transformers-base, vector, vector-algorithms [details]
License MIT
Author
Maintainer Luis Pedro Coelho <luis@luispedro.org>
Category Algorithms
Uploaded by luispedro at Thu Jul 11 06:39:18 UTC 2019
Distributions
Executables SortLines
Downloads 30 total (30 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs not available [build log]
All reported builds failed as of 2019-07-11 [all 2 reports]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for outsort-0.1.0

[back to package description]

Outsort: generic (Haskell-based) external sorting

Example

    import qualified Data.Conduit.Combinators as CC
    import qualified Data.Conduit.Binary as CB

    import Algorithms.OutSort (isolateBySize)
    import Algorithms.SortMain (sortMain)

    main :: IO ()
    main = sortMain
        CB.lines
        CC.unlinesAscii
        (isolateBySize (const 1) 500000)

All that is needed is a decoder (ConduitT ByteString a m ()), an encoder (ConduitT ByteString a m ()), and a function to split the input into blocks (ConduitT a a m ()). Given these elements, the result is a programme which can sort arbitrarily large inputs using external memory.

Licence: MIT

Author: Luis Pedro Coelho (email: coelho@embl.de) (on twitter: @luispedrocoelho)