MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / write_large_bytes

Method write_large_bytes

tools/python-3.11.9-amd64/Lib/pickle.py:247–260  ·  view source on GitHub ↗
(self, header, payload)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

commit_frameMethod · 0.95
writeFunction · 0.70

Tested by

no test coverage detected