| @@ 181-195 (lines=15) @@ | ||
| 178 | ||
| 179 | while (false !== $bytes = $this->_nextSequence()) { |
|
| 180 | // if we're filtering the input |
|
| 181 | if (isset($this->_filter)) { |
|
| 182 | // if we can't filter because we need more bytes |
|
| 183 | while ($this->_filter->shouldBuffer($bytes)) { |
|
| 184 | // then collect bytes into the buffer |
|
| 185 | if (false === $moreBytes = $this->_nextSequence(1)) { |
|
| 186 | break; |
|
| 187 | } |
|
| 188 | ||
| 189 | foreach ($moreBytes as $b) { |
|
| 190 | $bytes[] = $b; |
|
| 191 | } |
|
| 192 | } |
|
| 193 | // and filter them |
|
| 194 | $bytes = $this->_filter->filter($bytes); |
|
| 195 | } |
|
| 196 | ||
| 197 | $enc = $this->_encodeByteSequence($bytes, $size); |
|
| 198 | ||
| @@ 81-95 (lines=15) @@ | ||
| 78 | ||
| 79 | while (false !== $bytes = $this->_nextSequence()) { |
|
| 80 | // If we're filtering the input |
|
| 81 | if (isset($this->_filter)) { |
|
| 82 | // If we can't filter because we need more bytes |
|
| 83 | while ($this->_filter->shouldBuffer($bytes)) { |
|
| 84 | // Then collect bytes into the buffer |
|
| 85 | if (false === $moreBytes = $this->_nextSequence(1)) { |
|
| 86 | break; |
|
| 87 | } |
|
| 88 | ||
| 89 | foreach ($moreBytes as $b) { |
|
| 90 | $bytes[] = $b; |
|
| 91 | } |
|
| 92 | } |
|
| 93 | // And filter them |
|
| 94 | $bytes = $this->_filter->filter($bytes); |
|
| 95 | } |
|
| 96 | ||
| 97 | $enc = $this->_encodeByteSequence($bytes, $size); |
|
| 98 | ||