Skip to main content

base91x

https://pypi.org/project/base91x/

Test codecov GitHub release (latestSemVer) PyPI License Python

This base91x method provides data encoding and decoding using numeric system of base 91 with specific alphabet that does not require escaping any symbols in C, C++ (and many other languages?) string. 'x' - means the alphabet was obtained with XOR function.

The alphabet contains visible printable characters of ASCII except:

" Quotation mark

' Apostrophe

\ Backslash

An encoded string might be used for JSON string if JSON does not require to escape / Slash.

Encoded string size ~ 16 * original size / 13.

There is possibility to extend the algorithm to use 89 codes during decode.

The alphabet transforms from base91 value with operation XOR(0x7F) with the tree exceptions.

The alphabet in the order:

!~}|{zyxwvutsrqponmlkjihgfedcba`_^]#[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)($&%

PAY ATTENTION:

Encoded string may have awkwardly sequence /* or */ It may hurt C or C++ code when the string is placed into code. But sequence %%% should not appear. So, encoded string might be placed with raw string literal:

char string[]=R"%%%( a string )%%%";

Workaround: use space | line feed | tab in encoded text to break wrong sequence due the algorithm skips non alphabet symbols. e.g. Ma^7*/0629 -> Ma^7* /0629

The algorithm is not compatible with https://base91.sourceforge.net/

Metadata

Release files for base91x 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for base91x 1.0.1
File Size Uploaded
base91x-1.0.1.tar.gz 117.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for base91x 1.0.1
File Interpreter ABI Platform
base91x-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 124.2 kB

Release files / base91x-1.0.1.tar.gz

Download URL base91x-1.0.1.tar.gz
Size 117.5 kB
Tags Source
SHA-256 checksum
How to use checksums
92cedb90274a4951e519f6345f607fe114cfdfffba9c8480342d821e4390485d
BLAKE2b-256 checksum
How to use checksums
f2cde8daa80cc7a95f35f8d146db2fcae934afa8a70457f20d30b4ab3f8874c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / base91x-1.0.1-py3-none-any.whl

Download URL base91x-1.0.1-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2b07fff02d8f5fb917e5be454eef4ad73d35f36fae9ed824203bcd8286239847
BLAKE2b-256 checksum
How to use checksums
1430784c04d0947c94885fe6256add5b4c5d11dd5df19c535e8a797217f95141
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page