MCPcopy Create free account
hub / github.com/SpectacularAI/sdk / readBytes

Function readBytes

python/cli/visualization/serialization.py:15–24  ·  view source on GitHub ↗
(in_stream, n)

Source from the content-addressed store, hash-verified

13HEADER_SIZE = 16 # Message header bytes
14
15def readBytes(in_stream, n):
16 result = b"" # Initialize an empty bytes object
17 while n > 0:
18 chunk = in_stream.read(n)
19 if len(chunk) > 0:
20 result += chunk
21 n -= len(chunk)
22 else:
23 time.sleep(0.01)
24 return result
25
26class VioDeserializer:
27 def __init__(self, directory, onVioOutput, onMappingOutput):

Callers 2

startMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected