This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nikratio
Recipients Arfrever, martin.panter, nikratio, pitrou, serhiy.storchaka
Date 2015-02-28.18:27:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <> (Martin Panter's message of "Sat, 28 Feb 2015 00:59:32 +0000")
On Feb 27 2015, Martin Panter <> wrote:
> In the code review, Nikolaus raised the idea of allowing a custom
> “buffer_size” parameter for the BufferedReader. I think this would
> need a bit of consideration about how it should work:
> 1. Should it be a direct wrapper around
> BufferedReader(buffer_size=...)?

I'm not 100% sure what you mean by that, but I think the answer is Yes.

> 2. Should it also support an unbuffered reader mode like
> open(buffering=0), socket.makefile(buffering=0), and
> subprocess.Popen(bufsize=0)?

Yes, in that case the DecompressReader should simply be used without
encapsulating it in BufferedReader.

> 3. Should there be any consideration for buffering in write mode
> (mirroring the equivalent open(), etc parameters)?

I don't think so. There's not much to be gained by buffering data before
passing it to the compressor, so the only point of buffering is to avoid
short writes (or reads in case of decompressing). But the low-level
compressor code already avoids short writes.


GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«
Date User Action Args
2015-02-28 18:27:13nikratiosetrecipients: + nikratio, pitrou, Arfrever, martin.panter, serhiy.storchaka
2015-02-28 18:27:13nikratiolinkissue23529 messages
2015-02-28 18:27:13nikratiocreate