Converting UInt8 Array to BigInt, and back

Some time ago I started something like this, but it turned out to require more work than I was willing to put into it: