MCPcopy Index your code
hub / github.com/python/cpython / _create_payload

Method _create_payload

Lib/tarfile.py:1199–1206  ·  view source on GitHub ↗

Return the string payload filled with zero bytes up to the next 512 byte border.

(payload)

Source from the content-addressed store, hash-verified

1197
1198 @staticmethod
1199 def _create_payload(payload):
1200 """Return the string payload filled with zero bytes
1201 up to the next 512 byte border.
1202 """
1203 blocks, remainder = divmod(len(payload), BLOCKSIZE)
1204 if remainder > 0:
1205 payload += (BLOCKSIZE - remainder) * NUL
1206 return payload
1207
1208 @classmethod
1209 def _create_gnu_long_header(cls, name, type, encoding, errors):

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected