MCPcopy Index your code
hub / github.com/RustPython/RustPython / _byteswap

Function _byteswap

Lib/wave.py:96–103  ·  view source on GitHub ↗
(data, width)

Source from the content-addressed store, hash-verified

94
95
96def _byteswap(data, width):
97 swapped_data = bytearray(len(data))
98
99 for i in range(0, len(data), width):
100 for j in range(width):
101 swapped_data[i + width - 1 - j] = data[i + j]
102
103 return bytes(swapped_data)
104
105
106class _Chunk:

Callers 2

readframesMethod · 0.85
writeframesrawMethod · 0.85

Calls 1

lenFunction · 0.85

Tested by

no test coverage detected