MCPcopy Create free account
hub / github.com/ElementsProject/elements / bufreverse

Function bufreverse

contrib/linearize/linearize-data.py:35–40  ·  view source on GitHub ↗
(in_buf)

Source from the content-addressed store, hash-verified

33 (((x) >> 8) & 0x0000ff00) | ((x) >> 24) ))
34
35def bufreverse(in_buf):
36 out_words = []
37 for i in range(0, len(in_buf), 4):
38 word = struct.unpack('@I', in_buf[i:i+4])[0]
39 out_words.append(struct.pack('@I', bytereverse(word)))
40 return b''.join(out_words)
41
42def wordreverse(in_buf):
43 out_words = []

Callers 1

calc_hash_strFunction · 0.85

Calls 2

bytereverseFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected