MCPcopy Index your code
hub / github.com/RustPython/RustPython / write

Method write

Lib/tarfile.py:443–451  ·  view source on GitHub ↗

Write string s to the stream.

(self, s)

Source from the content-addressed store, hash-verified

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

Callers 7

copyfileobjFunction · 0.45
writeMethod · 0.45
__writeMethod · 0.45
closeMethod · 0.45
__init__Method · 0.45
closeMethod · 0.45
addfileMethod · 0.45

Calls 3

__writeMethod · 0.95
lenFunction · 0.85
compressMethod · 0.45

Tested by

no test coverage detected