read text file byte by byte

MRAB python at mrabarnett.plus.com
Sun Dec 13 22:14:11 EST 2009


Nobody wrote:
> On Sun, 13 Dec 2009 12:39:26 -0800, Dennis Lee Bieber wrote:
> 
>> 	You originally stated that you want to "scramble" the bytes -- if
>> you mean to implement some sort of encryption algorithm you should know
>> that most of them work in blocks as the "key" is longer than one byte.
> 
> Block ciphers work in blocks. Stream ciphers work on bytes, regardless of
> the length of the key.
> 
It's still more efficient to read in blocks, even if you're going to
process the bytes one at a time.



More information about the Python-list mailing list