MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / _chunk

Function _chunk

tests/integration/test_image_view.py:132–134  ·  view source on GitHub ↗
(tag: bytes, data: bytes)

Source from the content-addressed store, hash-verified

130 """1×1 white PNG."""
131
132 def _chunk(tag: bytes, data: bytes) -> bytes:
133 crc = zlib.crc32(tag + data) & 0xFFFFFFFF
134 return struct.pack(">I", len(data)) + tag + data + struct.pack(">I", crc)
135
136 sig = b"\x89PNG\r\n\x1a\n"
137 ihdr_data = struct.pack(">IIBBBBB", 1, 1, 8, 2, 0, 0, 0) # 1×1 RGB8

Callers 1

_make_minimal_pngFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected