MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _byteswap

Function _byteswap

tools/python-3.11.9-amd64/Lib/wave.py:93–100  ·  view source on GitHub ↗
(data, width)

Source from the content-addressed store, hash-verified

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

Callers 2

readframesMethod · 0.85
writeframesrawMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected