manchester-code
Python library to encode & decode data as Manchester code
Setup
$ pip3 install --user --upgrade manchester-code
Usage
0-bits translate to low-high, 1-bits to high-low (G. E. Thomas convention).
import manchester-code
manchester_code = encode([0b00001111, 0b01101001])
print(''.join(['{:08b}'.format(m) for m in manchester_code]))
# 01010101101010100110100110010110
encode(b'msg')
# b'i\xa6jZij'
decode([0b01010101, 0b10101010, 0b01101001, 0b10010110])
# 0000111101101001
decode(b'ieiVjeiV')
# b'data'
Metadata
Release files for manchester-code 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| manchester-code-1.1.0.tar.gz | 27.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| manchester_code-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 43.3 kB
Release files / manchester-code-1.1.0.tar.gz
| Download URL | manchester-code-1.1.0.tar.gz |
|---|---|
| Size | 27.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e8b09dd45785233359de02cc1baf2747af7993a6335099ca3c6784d21f184e54
|
|
BLAKE2b-256 checksum How to use checksums |
ba6c7e8d4e9113e10fb931d0cfa28edc878cbd634d40129465d75dd7edbfe0d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5
|
Release files / manchester_code-1.1.0-py3-none-any.whl
| Download URL | manchester_code-1.1.0-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23251eed4c91f42b8f05dd7e1cc4c97b895d9f7ad8dadaa0162b75680e282d37
|
|
BLAKE2b-256 checksum How to use checksums |
0102c9601fa2e9b87ea76de751838c5fd09cac61deee014c7256b9592a1cc7c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5
|