MCPcopy Create free account
hub / github.com/ActiveState/code / _decode

Function _decode

recipes/Python/572159_SPICE/recipe-572159.py:347–357  ·  view source on GitHub ↗

Private module function.

(string, map_1, map_2)

Source from the content-addressed store, hash-verified

345 return cache
346
347def _decode(string, map_1, map_2):
348 'Private module function.'
349 cache = ''
350 iterator = iter(string)
351 for byte in iterator:
352 bits_12 = map_1[ord(byte)] << 6
353 bits_34 = map_1[ord(iterator.next())] << 4
354 bits_56 = map_1[ord(iterator.next())] << 2
355 bits_78 = map_1[ord(iterator.next())]
356 cache += map_2[bits_12 + bits_34 + bits_56 + bits_78]
357 return cache
358
359################################################################################
360

Callers 6

decode_stringFunction · 0.70
decode_fileFunction · 0.70
readMethod · 0.70
recvMethod · 0.70
recvfromMethod · 0.70
decodeMethod · 0.70

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected