MCPcopy Index your code
hub / github.com/apache/fory / selective_buffer_callback

Function selective_buffer_callback

python/pyfory/tests/test_pickle_buffer.py:162–169  ·  view source on GitHub ↗
(buffer_object)

Source from the content-addressed store, hash-verified

160 counter = 0
161
162 def selective_buffer_callback(buffer_object):
163 nonlocal counter
164 counter += 1
165 if counter % 2 == 0:
166 buffer_objects.append(buffer_object)
167 return False
168 else:
169 return True
170
171 serialized = fory.serialize(data, buffer_callback=selective_buffer_callback)
172

Callers

nothing calls this directly

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected