MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / _ZeroSource

Class _ZeroSource

pkg/pypi/tests/test_cli.py:870–881  ·  view source on GitHub ↗

Reader that yields `size` zero bytes without holding them.

Source from the content-addressed store, hash-verified

868
869
870class _ZeroSource:
871 """Reader that yields `size` zero bytes without holding them."""
872
873 def __init__(self, size: int):
874 self._remaining = size
875
876 def read(self, size=-1):
877 if size is None or size < 0:
878 size = self._remaining
879 count = min(size, self._remaining)
880 self._remaining -= count
881 return bytes(count)
882
883
884class _CountingSink:

Calls

no outgoing calls