Message52097
There is a simple solution for that problem: DON'T!
If you pass a file descriptor to the GzipFile class it is your responsibility that the file is a gzip file and that the file pointer is at the right position. After having a short look into original code I don't think it can cope with the use case you brought up.
I'd even argue that seeking to the beginning of the file is broken behaviour. What if the gzip content doesn't start at the beginning of the file? In fact prepending some header before compressed data is quite common. If the file you where reading really had a header your example had just worked. |
|
Date |
User |
Action |
Args |
2007-08-23 15:57:20 | admin | link | issue1675951 messages |
2007-08-23 15:57:20 | admin | create | |
|