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 nadeem.vawda
Recipients Kontr-Olli, akuchling, dbonner, djc, eric.araujo, loewis, nadeem.vawda, niemeyer, nirai, pitrou, python-dev, r.david.murray, therve, thomaslee
Date 2011-05-27.21:37:02
SpamBayes Score 1.493202e-07
Marked as misclassified No
Message-id <1306532223.16.0.250208370477.issue1625@psf.upfronthosting.co.za>
In-reply-to
Content
I seem to be unable to log in to rietveld, so I'll reply here.

>> result += decomp.decompress(data)
> Is this efficient?  I understood that other Python implementations
> had poorly performing str.__iadd__, and therefore that using a list
> was the common idiom (using “return b''.join(result)” at the end).

Good point. I hadn't thought about other implementations.

Also, you're right about the superfluous comments in test_bz2; I'll do a
general cleanup of the test code soon.

> Looks good.  I only have one paranoid comment: since the tests use
> self.TEXT * 5 to create multiple streams, the ordering of the files is
> not tested.  IOW, the code could mix-up the order of the files and the
> tests would not catch that.  Is it a concern?

I wouldn't think so. It's not as though there is an index that the code
looks at to find the location of each stream. It just reads the data from
the file and if it reaches the end of one stream, it assumes that the
following data is a new stream, and decompresses it accordingly.

That said, I wouldn't be opposed to adding a test for that sort of thing
(just for paranoia's sake :P) if it doesn't involve adding large amounts
of additional binary data in the file. I'll come back to it once I've
tidied up the existing code.
History
Date User Action Args
2011-05-27 21:37:03nadeem.vawdasetrecipients: + nadeem.vawda, loewis, akuchling, niemeyer, pitrou, therve, thomaslee, djc, eric.araujo, nirai, r.david.murray, dbonner, Kontr-Olli, python-dev
2011-05-27 21:37:03nadeem.vawdasetmessageid: <1306532223.16.0.250208370477.issue1625@psf.upfronthosting.co.za>
2011-05-27 21:37:02nadeem.vawdalinkissue1625 messages
2011-05-27 21:37:02nadeem.vawdacreate