Encode arbitrary bits to a sequence of private-use codepoints.
Most systems will leave private-use characters unmolested, as they should. This codec allows encoding arbitrary bits into a sequence of private-use codepoints, and back again.
Fit 280 bytes of data into a tweet!
Simple, byte-padded API:
import base_private
string = base_private.encode(some_bytes)
original_bytes = base_private.decode(string)
The bits API is:
import base_private
codepoints = base_private.encode_bits(a_bunch_of_bytes, number_of_bits_i_care_about)
original_bytes, number_of_bits = base_private.decode_bits(codepoints)