MCPcopy Index your code
hub / github.com/python/cpython / _byteswap

Function _byteswap

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

Source from the content-addressed store, hash-verified

105
106
107def _byteswap(data, width):
108 swapped_data = bytearray(len(data))
109
110 for i in range(0, len(data), width):
111 for j in range(width):
112 swapped_data[i + width - 1 - j] = data[i + j]
113
114 return swapped_data.take_bytes()
115
116
117class _Chunk:

Callers 2

readframesMethod · 0.85
writeframesrawMethod · 0.85

Calls 1

take_bytesMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…