Message70625
>>> import zlib
>>> s='This is a string'
>>> sc=zlib.compress(s)
>>> sc
bytearray(b'x\x9c\x0b\xc9\xc8,V\x00\xa2D\x85\xe2\x92\xa2\xcc\xbct\x00/\xc2\x05\xcd')
>>> zlib.decompress(sc)
bytearray(b'This is a string')
>>>
This is wrong behavior as compress functions should return byte
,not a bytearray. Same for decompress. |
|
Date |
User |
Action |
Args |
2008-08-02 10:15:59 | pythonhacker | set | recipients:
+ pythonhacker |
2008-08-02 10:15:59 | pythonhacker | set | messageid: <1217672159.34.0.803781605821.issue3492@psf.upfronthosting.co.za> |
2008-08-02 10:15:58 | pythonhacker | link | issue3492 messages |
2008-08-02 10:15:57 | pythonhacker | create | |
|