(bytes_read)
| 1465 | |
| 1466 | |
| 1467 | def _new_buffersize(bytes_read): |
| 1468 | # Parallels _io/fileio.c new_buffersize |
| 1469 | if bytes_read > 65536: |
| 1470 | addend = bytes_read >> 3 |
| 1471 | else: |
| 1472 | addend = 256 + bytes_read |
| 1473 | if addend < DEFAULT_BUFFER_SIZE: |
| 1474 | addend = DEFAULT_BUFFER_SIZE |
| 1475 | return bytes_read + addend |
| 1476 | |
| 1477 | |
| 1478 | class FileIO(RawIOBase): |