manchester-code 1.1.0

Creator: bradpython12

Last updated:

0 purchases

TODO
Add to Cart

Description:

manchestercode 1.1.0

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'

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.