Skip to content
This repository has been archived by the owner on Jul 4, 2018. It is now read-only.

morganwahl/base-private-use

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

base-private-use

Encode arbitrary bits to a sequence of private-use codepoints.

CircleCI codecov Build Status Coverage Status

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)

About

Encode arbitrary bits to a sequence of private-use codepoints. Moved to https://gitlab.com/morganwahl/base-private-use

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages