METADATA 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. Metadata-Version: 2.1
  2. Name: crcmod
  3. Version: 1.7
  4. Summary: CRC Generator
  5. Home-page: http://crcmod.sourceforge.net/
  6. Author: Ray Buvel
  7. Author-email: rlbuvel@gmail.com
  8. License: MIT
  9. Download-URL: http://sourceforge.net/projects/crcmod
  10. Platform: UNKNOWN
  11. Classifier: Development Status :: 5 - Production/Stable
  12. Classifier: Intended Audience :: Developers
  13. Classifier: Intended Audience :: Education
  14. Classifier: Intended Audience :: End Users/Desktop
  15. Classifier: Intended Audience :: Information Technology
  16. Classifier: Intended Audience :: Science/Research
  17. Classifier: License :: OSI Approved :: MIT License
  18. Classifier: Operating System :: OS Independent
  19. Classifier: Programming Language :: C
  20. Classifier: Programming Language :: C++
  21. Classifier: Programming Language :: Python
  22. Classifier: Programming Language :: Python :: 2
  23. Classifier: Programming Language :: Python :: 2.4
  24. Classifier: Programming Language :: Python :: 2.5
  25. Classifier: Programming Language :: Python :: 2.6
  26. Classifier: Programming Language :: Python :: 2.7
  27. Classifier: Programming Language :: Python :: 3
  28. Classifier: Programming Language :: Python :: 3.1
  29. Classifier: Topic :: Communications
  30. Classifier: Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator
  31. Classifier: Topic :: Scientific/Engineering :: Mathematics
  32. Classifier: Topic :: Utilities
  33. ===========================
  34. crcmod for Calculating CRCs
  35. ===========================
  36. The software in this package is a Python module for generating objects that
  37. compute the Cyclic Redundancy Check (CRC). There is no attempt in this package
  38. to explain how the CRC works. There are a number of resources on the web that
  39. give a good explanation of the algorithms. Just do a Google search for "crc
  40. calculation" and browse till you find what you need. Another resource can be
  41. found in chapter 20 of the book "Numerical Recipes in C" by Press et. al.
  42. This package allows the use of any 8, 16, 24, 32, or 64 bit CRC. You can
  43. generate a Python function for the selected polynomial or an instance of the
  44. Crc class which provides the same interface as the ``md5`` and ``sha`` modules
  45. from the Python standard library. A ``Crc`` class instance can also generate
  46. C/C++ source code that can be used in another application.
  47. ----------
  48. Guidelines
  49. ----------
  50. Documentation is available from the doc strings. It is up to you to decide
  51. what polynomials to use in your application. If someone has not specified the
  52. polynomials to use, you will need to do some research to find one suitable for
  53. your application. Examples are available in the unit test script ``test.py``.
  54. You may also use the ``predefined`` module to select one of the standard
  55. polynomials.
  56. If you need to generate code for another language, I suggest you subclass the
  57. ``Crc`` class and replace the method ``generateCode``. Use ``generateCode`` as
  58. a model for the new version.
  59. ------------
  60. Dependencies
  61. ------------
  62. Python Version
  63. ^^^^^^^^^^^^^^
  64. The package has separate code to support the 2.x and 3.x Python series.
  65. For the 2.x versions of Python, these versions have been tested:
  66. * 2.4
  67. * 2.5
  68. * 2.6
  69. * 2.7
  70. It may still work on earlier versions of Python 2.x, but these have not been
  71. recently tested.
  72. For the 3.x versions of Python, these versions have been tested:
  73. * 3.1
  74. Building C extension
  75. ^^^^^^^^^^^^^^^^^^^^
  76. To build the C extension, the appropriate compiler tools for your platform must
  77. be installed. Refer to the Python documentation for building C extensions for
  78. details.
  79. ------------
  80. Installation
  81. ------------
  82. The crcmod package is installed using ``distutils``.
  83. Run the following command::
  84. python setup.py install
  85. If the extension module builds, it will be installed. Otherwise, the
  86. installation will include the pure Python version. This will run significantly
  87. slower than the extension module but will allow the package to be used.
  88. For Windows users who want to use the mingw32 compiler, run this command::
  89. python setup.py build --compiler=mingw32 install
  90. For Python 3.x, the install process is the same but you need to use the 3.x
  91. interpreter.
  92. ------------
  93. Unit Testing
  94. ------------
  95. The ``crcmod`` package has a module ``crcmod.test``, which contains unit
  96. tests for both ``crcmod`` and ``crcmod.predefined``.
  97. When you first install ``crcmod``, you should run the unit tests to make sure
  98. everything is installed properly. The test script performs a number of tests
  99. including a comparison to the direct method which uses a class implementing
  100. polynomials over the integers mod 2.
  101. To run the unit tests on Python >=2.5::
  102. python -m crcmod.test
  103. Alternatively, in the ``test`` directory run::
  104. python test_crcmod.py
  105. ---------------
  106. Code Generation
  107. ---------------
  108. The crcmod package is capable of generating C functions that can be compiled
  109. with a C or C++ compiler. In the test directory, there is an examples.py
  110. script that demonstrates how to use the code generator. The result of this is
  111. written out to the file ``examples.c``. The generated code was checked to make
  112. sure it compiles with the GCC compiler.
  113. -------
  114. License
  115. -------
  116. The ``crcmod`` package is released under the MIT license. See the ``LICENSE``
  117. file for details.
  118. ------------
  119. Contributors
  120. ------------
  121. Craig McQueen