Write string s to the stream.
(self, s)
| 441 | self.__write(self.name.encode("iso-8859-1", "replace") + NUL) |
| 442 | |
| 443 | def write(self, s): |
| 444 | """Write string s to the stream. |
| 445 | """ |
| 446 | if self.comptype == "gz": |
| 447 | self.crc = self.zlib.crc32(s, self.crc) |
| 448 | self.pos += len(s) |
| 449 | if self.comptype != "tar": |
| 450 | s = self.cmp.compress(s) |
| 451 | self.__write(s) |
| 452 | |
| 453 | def __write(self, s): |
| 454 | """Write string s to the stream if a whole new block |