https://github.com/deric-w/chain-encoding
Python module and description of a encoding with infinite letter space.
https://github.com/deric-w/chain-encoding
decoder encoder encoding python3
Last synced: about 1 year ago
JSON representation
Python module and description of a encoding with infinite letter space.
- Host: GitHub
- URL: https://github.com/deric-w/chain-encoding
- Owner: Deric-W
- License: mit
- Created: 2019-03-02T17:32:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-08T14:11:35.000Z (about 7 years ago)
- Last Synced: 2025-01-22T06:37:51.294Z (over 1 year ago)
- Topics: decoder, encoder, encoding, python3
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Chain-encoding
Chain encoding is a simple, (used with numbers less than 128) ASCII-compatible Unicode based encoding that uses the unused 8th bit of an ASCII byte to concatenate multiple bytes (like a chain).
As a result, an infinite number of letters can be stored.
## Syntax
If the bit is 1, the other 7 bits are chained to the previous byte.
If the bit is 0, a new chain is created.
## Examples
### E
**0**1000101 --> new Chain 1000101 --> 1000101 --> 69 --> `E`
### Ä
**0**0000001 **1**1000100 --> new Chain 0000001 + 1000100 --> 00000011000100 --> 196 --> `Ä`
### 漢
**0**0000001 **1**1011110 **1**0100010 --> new Chain 0000001 + 1011110 + 0100010 --> 000000110111100100010 --> 28450 --> `漢`
### Invalid
**1**0100110 **1**0010000 --> missing start of Chain