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

Method write_large_bytes

Lib/pickle.py:244–257  ·  view source on GitHub ↗
(self, header, payload)

Source from the content-addressed store, hash-verified

242 return self.file_write(data)
243
244 def write_large_bytes(self, header, payload):
245 write = self.file_write
246 if self.current_frame:
247 # Terminate the current frame and flush it to the file.
248 self.commit_frame(force=True)
249
250 # Perform direct write of the header and payload of the large binary
251 # object. Be careful not to concatenate the header and the payload
252 # prior to calling 'write' as we do not want to allocate a large
253 # temporary bytes object.
254 # We intentionally do not insert a protocol 4 frame opcode to make
255 # it possible to optimize file.read calls in the loader.
256 write(header)
257 write(payload)
258
259
260class _Unframer:

Callers

nothing calls this directly

Calls 2

commit_frameMethod · 0.95
writeFunction · 0.70

Tested by

no test coverage detected