MCPcopy Create free account
hub / github.com/apache/cassandra-python-driver / read_uint_le

Function read_uint_le

cassandra/protocol.py:1288–1300  ·  view source on GitHub ↗

Read a sequence of little endian bytes and return an unsigned integer.

(f, size=4)

Source from the content-addressed store, hash-verified

1286
1287
1288def read_uint_le(f, size=4):
1289 """
1290 Read a sequence of little endian bytes and return an unsigned integer.
1291 """
1292
1293 if size == 4:
1294 value = uint32_le_unpack(f.read(4))
1295 else:
1296 value = 0
1297 for i in range(size):
1298 value |= (read_byte(f) & 0xFF) << 8 * i
1299
1300 return value
1301
1302
1303def write_uint_le(f, i, size=4):

Callers 2

decode_headerMethod · 0.90
decodeMethod · 0.90

Calls 2

read_byteFunction · 0.85
readMethod · 0.80

Tested by

no test coverage detected