summaryrefslogtreecommitdiff
path: root/src/BitfieldMan.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-06-11 21:32:33 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-06-11 21:41:56 +0900
commitdeaea9537b718a4527e7033ac4543b5af58a62f2 (patch)
treeda810714e4b00aa6e4ae547c5dc153a20c78d933 /src/BitfieldMan.h
parent595a514b171441fb8706b19b3a46773e7c2bcf70 (diff)
Added --stream-piece-selector option.
This option specifies piece selection algorithm used in HTTP/FTP download. Piece means fixed length segment which is downloaded in parallel in segmented download. If 'default' is given, aria2 selects piece so that it reduces the number of establishing connection. This is reasonable default behaviour because establishing connection is an expensive operation. If 'inorder' is given, aria2 selects piece which has minimum index. Index=0 means first of the file. This will be useful to view movie while downloading it. --enable-http-pipelining option may be useful to reduce reconnection overhead. Please note that aria2 honors --min-split-size option, so it will be necessary to specify a reasonable value to --min-split-size option.
Diffstat (limited to 'src/BitfieldMan.h')
-rw-r--r--src/BitfieldMan.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/BitfieldMan.h b/src/BitfieldMan.h
index 8fb9de86..817b9ae8 100644
--- a/src/BitfieldMan.h
+++ b/src/BitfieldMan.h
@@ -135,6 +135,16 @@ public:
const unsigned char* ignoreBitfield,
size_t ignoreBitfieldLength) const;
+ // Stores missing bit index to index. This function selects smallest
+ // index of missing piece, considering minSplitSize. Set bits in
+ // ignoreBitfield are excluded. Returns true if such bit index is
+ // found. Otherwise returns false.
+ bool getInorderMissingUnusedIndex
+ (size_t& index,
+ size_t minSplitSize,
+ const unsigned char* ignoreBitfield,
+ size_t ignoreBitfieldLength) const;
+
// affected by filter
bool getAllMissingIndexes(unsigned char* misbitfield, size_t mislen) const;