Write string s to the stream.
(self, s)
| 432 | self.__write(self.name.encode("iso-8859-1", "replace") + NUL) |
| 433 | |
| 434 | def write(self, s): |
| 435 | """Write string s to the stream. |
| 436 | """ |
| 437 | if self.comptype == "gz": |
| 438 | self.crc = self.zlib.crc32(s, self.crc) |
| 439 | self.pos += len(s) |
| 440 | if self.comptype != "tar": |
| 441 | s = self.cmp.compress(s) |
| 442 | self.__write(s) |
| 443 | |
| 444 | def __write(self, s): |
| 445 | """Write string s to the stream if a whole new block |