https://github.com/luispedro/outsort
Generic sorting of large datasets (using temporary files as temporary space)
https://github.com/luispedro/outsort
external-sorting haskell library sorting
Last synced: 22 days ago
JSON representation
Generic sorting of large datasets (using temporary files as temporary space)
- Host: GitHub
- URL: https://github.com/luispedro/outsort
- Owner: luispedro
- License: other
- Created: 2017-09-05T14:41:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-07-11T06:38:50.000Z (almost 7 years ago)
- Last Synced: 2025-12-28T02:53:14.271Z (5 months ago)
- Topics: external-sorting, haskell, library, sorting
- Language: Haskell
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog
- License: COPYING
Awesome Lists containing this project
README
# Outsort: generic (Haskell-based) external sorting
Example
```haskell
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](http://luispedro.org) (email:
[coelho@embl.de](mailto:coelho@embl.de)) (on twitter:
[@luispedrocoelho](https://twitter.com/luispedrocoelho))