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