MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / _read

Method _read

src/packagedcode/pyrpm.py:286–296  ·  view source on GitHub ↗
(cls, fmt, store)

Source from the content-addressed store, hash-verified

284
285 @classmethod
286 def _read(cls, fmt, store):
287 size = struct.calcsize(fmt)
288 data = store.read(size)
289 if len(data) == 0:
290 return b''
291
292 unpacked_data = struct.unpack(fmt, data)
293 if len(unpacked_data) == 1:
294 return unpacked_data[0]
295 else:
296 return unpacked_data
297
298 @classmethod
299 def read_null(cls, store, count):

Callers 6

read_charMethod · 0.80
read_int8Method · 0.80
read_int16Method · 0.80
read_int32Method · 0.80
read_int64Method · 0.80
read_binMethod · 0.80

Calls 1

readMethod · 0.45

Tested by

no test coverage detected