brawn1 / pycrc16 Goto Github PK
View Code? Open in Web Editor NEWThis project forked from gtrafimenkov/pycrc16
Python library for calculating CRC16
License: GNU Lesser General Public License v3.0
This project forked from gtrafimenkov/pycrc16
Python library for calculating CRC16
License: GNU Lesser General Public License v3.0
==================================== Python library for calculating CRC16 ==================================== CRC is a way of detecting accidental changes in data storage or transmission. There are many variants of CRC and CRC16, in particular. This library calculates only CRC16 (16-bit codes) and the only supported variant at the moment is CRC-CCITT (XModem). If you want to know more about CRC, http://wikipedia.org/wiki/Cyclic_redundancy_check is a good place to start. If you want other variants of CRC16 supported, please make a request at https://github.com/Brawn1/pycrc16/issues Source codes are hosted at https://github.com/Brawn1/pycrc16 If you want to contribute to this library, create a fork, make you changes and then create a pull request. Any help is appreciated. ------------ Installation ------------ On Windows you can use precompiled binaries which can be found on the package side. On Linux and other operation systems you should compile the library from the source codes. To do this on Linux use following steps: * download source tarball, e.g. crc16-0.1.2.tar.gz, from https://github.com/Brawn1/pycrc16/tags * extract it with command:: tar -xzf crc16-0.1.2.tar.gz * compile and install the library:: cd crc16-0.1.2 python setup.py build sudo python setup.py install you will need the administrative privileges to execute the last command. After installation you can run unit tests to make sure that the library works fine. Execute:: python -m crc16.test ----- Usage ----- In Python 3:: import crc16 print(crc16.crc16xmodem(b'123456789')) In Python 2 you should use strings instead of binary data:: import crc16 print(crc16.crc16xmodem('123456789')) You can also calculate CRC gradually:: import crc16 crc = crc16.crc16xmodem(b'1234') crc = crc16.crc16xmodem(b'56789', crc) print(crc) -------------- Other projects -------------- There are a number of projects and libraries for CRC calculation. See for example: * binascii.crc32 in the standart Python library * pycrc (http://www.tty1.net/pycrc) * crcmod (http://pypi.python.org/pypi/crcmod)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.