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

Method _create_payload

Lib/tarfile.py:1201–1208  ·  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

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

Callers 2

Calls 2

lenFunction · 0.85
divmodFunction · 0.50

Tested by

no test coverage detected