diff options
Diffstat (limited to 'src/Data/Torrent')
-rw-r--r-- | src/Data/Torrent/Bitfield.hs | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/src/Data/Torrent/Bitfield.hs b/src/Data/Torrent/Bitfield.hs index d564e353..b14094fb 100644 --- a/src/Data/Torrent/Bitfield.hs +++ b/src/Data/Torrent/Bitfield.hs | |||
@@ -18,7 +18,7 @@ | |||
18 | -- * Rarest first selection - performed to avoid situation when | 18 | -- * Rarest first selection - performed to avoid situation when |
19 | -- rarest piece is unaccessible. | 19 | -- rarest piece is unaccessible. |
20 | -- | 20 | -- |
21 | -- * _End game_ seletion - performed after a peer has requested all | 21 | -- * /End game/ seletion - performed after a peer has requested all |
22 | -- the subpieces of the content. | 22 | -- the subpieces of the content. |
23 | -- | 23 | -- |
24 | -- Note that BitTorrent applies the strict priority policy for | 24 | -- Note that BitTorrent applies the strict priority policy for |
@@ -28,24 +28,38 @@ | |||
28 | {-# LANGUAGE BangPatterns #-} | 28 | {-# LANGUAGE BangPatterns #-} |
29 | {-# LANGUAGE RecordWildCards #-} | 29 | {-# LANGUAGE RecordWildCards #-} |
30 | module Data.Torrent.Bitfield | 30 | module Data.Torrent.Bitfield |
31 | ( PieceIx, PieceCount, Bitfield | 31 | ( -- * Bitfield |
32 | PieceIx | ||
33 | , PieceCount | ||
34 | , Bitfield | ||
32 | 35 | ||
33 | -- * Construction | 36 | -- * Construction |
34 | , haveAll, haveNone, have, singleton | 37 | , haveAll |
38 | , haveNone | ||
39 | , have | ||
40 | , singleton | ||
35 | , interval | 41 | , interval |
36 | , adjustSize | 42 | , adjustSize |
37 | 43 | ||
38 | -- * Query | 44 | -- * Query |
45 | -- ** Cardinality | ||
39 | , Data.Torrent.Bitfield.null | 46 | , Data.Torrent.Bitfield.null |
40 | , Data.Torrent.Bitfield.full | 47 | , Data.Torrent.Bitfield.full |
41 | , haveCount, totalCount, completeness | 48 | , haveCount |
42 | 49 | , totalCount | |
43 | , member, notMember | 50 | , completeness |
44 | , findMin, findMax | 51 | |
45 | 52 | -- ** Membership | |
53 | , member | ||
54 | , notMember | ||
55 | , findMin | ||
56 | , findMax | ||
46 | , isSubsetOf | 57 | , isSubsetOf |
47 | 58 | ||
48 | , Frequency, frequencies, rarest | 59 | -- ** Availability |
60 | , Frequency | ||
61 | , frequencies | ||
62 | , rarest | ||
49 | 63 | ||
50 | -- * Combine | 64 | -- * Combine |
51 | , union | 65 | , union |