this question has a lot to do with the following one:
Getting Raw Binary Representation of a file in Python
with the following python code, i can now turn a testfile.txt
file into the binary version with these lines:
bytetable = [("00000000"+bin(x)[2:])[-1:-9:-1] for x in range(256)]
binrep = "".join(bytetable[x] for x in open("testfile.txt", "rb").read())
My question is, how do I return it back to normal afterwards? I want to take the binary, in this case 110011101111011010110110101001100000010000101110101001100001111000101110
and re-create testfile.txt
from it. If this is possible, let me know.