Lines Matching refs:tail
127 $tail = 0;
144 $tail = $eof;
147 while ($tail - $head > $this->chunk_size) {
148 $finger = $head + (int)(($tail - $head) / 2);
151 if ($finger == $head || $finger == $tail) {
158 $tail = $finger;
164 if ($tail - $head < 1) {
170 $lines = $this->readChunk($fp, $head, $tail);
172 return [$fp, $lines, $head, $tail, $eof];
181 * @param int $tail end point chunk
184 protected function readChunk($fp, $head, $tail) argument
187 $chunk_size = max($tail - $head, 0); // found chunk size
226 * @param int $tail position tail of last chunk
233 protected function readAdjacentChunk($fp, $head, $tail, $direction) argument
235 if (!$fp) return [[], $head, $tail];
239 $head = $tail;
240 $tail = $head + (int)($this->chunk_size * (2 / 3));
241 $tail = $this->getNewlinepointer($fp, $tail);
244 $tail = $head;
245 $head = max($tail - $this->chunk_size, 0);
249 if ($nl > 0 && $tail <= $nl) {
259 $lines = $this->readChunk($fp, $head, $tail);
260 return [$lines, $head, $tail];