fastcrc 0.2.1.dev8__tar.gz → 0.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. fastcrc-0.3.2/.readthedocs.yaml +35 -0
  2. fastcrc-0.3.2/CHANGELOG.rst +31 -0
  3. fastcrc-0.3.2/Cargo.lock +194 -0
  4. fastcrc-0.3.2/Cargo.toml +20 -0
  5. {fastcrc-0.2.1.dev8 → fastcrc-0.3.2}/PKG-INFO +24 -8
  6. {fastcrc-0.2.1.dev8 → fastcrc-0.3.2}/README.rst +4 -3
  7. {fastcrc-0.2.1.dev8 → fastcrc-0.3.2}/fastcrc/__info__.py +1 -1
  8. {fastcrc-0.2.1.dev8 → fastcrc-0.3.2}/fastcrc/__init__.py +1 -1
  9. fastcrc-0.3.2/fastcrc/crc8.py +428 -0
  10. fastcrc-0.3.2/pyproject.toml +34 -0
  11. {fastcrc-0.2.1.dev8 → fastcrc-0.3.2}/src/lib.rs +57 -13
  12. fastcrc-0.3.2/tea.yaml +7 -0
  13. fastcrc-0.2.1.dev8/.github/workflows/ci.yml +0 -163
  14. fastcrc-0.2.1.dev8/CHANGELOG.rst +0 -17
  15. fastcrc-0.2.1.dev8/Cargo.toml +0 -23
  16. fastcrc-0.2.1.dev8/MANIFEST.in +0 -5
  17. fastcrc-0.2.1.dev8/benchmarks/benchmark_result.txt +0 -288
  18. fastcrc-0.2.1.dev8/benchmarks/requirements.txt +0 -2
  19. fastcrc-0.2.1.dev8/benchmarks/test_benchmark.py +0 -229
  20. fastcrc-0.2.1.dev8/docs/Makefile +0 -20
  21. fastcrc-0.2.1.dev8/docs/conf.py +0 -62
  22. fastcrc-0.2.1.dev8/docs/index.rst +0 -25
  23. fastcrc-0.2.1.dev8/docs/make.bat +0 -35
  24. fastcrc-0.2.1.dev8/docs/requirements.txt +0 -2
  25. fastcrc-0.2.1.dev8/pyproject.toml +0 -3
  26. fastcrc-0.2.1.dev8/setup.py +0 -56
  27. fastcrc-0.2.1.dev8/tests/test_fastcrc.py +0 -336
  28. {fastcrc-0.2.1.dev8 → fastcrc-0.3.2}/.gitignore +0 -0
  29. {fastcrc-0.2.1.dev8 → fastcrc-0.3.2}/LICENSE +0 -0
  30. {fastcrc-0.2.1.dev8 → fastcrc-0.3.2}/fastcrc/crc16.py +0 -0
  31. {fastcrc-0.2.1.dev8 → fastcrc-0.3.2}/fastcrc/crc32.py +0 -0
  32. {fastcrc-0.2.1.dev8 → fastcrc-0.3.2}/fastcrc/crc64.py +0 -0
  33. {fastcrc-0.2.1.dev8 → fastcrc-0.3.2}/fastcrc/py.typed +0 -0
@@ -0,0 +1,35 @@
1
+ # .readthedocs.yaml
2
+ # Read the Docs configuration file
3
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4
+
5
+ # Required
6
+ version: 2
7
+
8
+ # Set the version of Python and other tools you might need
9
+ build:
10
+ os: ubuntu-22.04
11
+ tools:
12
+ python: "3.12"
13
+ rust: "1.70"
14
+ jobs:
15
+ pre_install:
16
+ - pip install maturin
17
+ - maturin build --release
18
+ - pip install target/wheels/fastcrc*.whl
19
+
20
+ # Build documentation in the docs/ directory with Sphinx
21
+ sphinx:
22
+ configuration: docs/conf.py
23
+ builder: html
24
+ fail_on_warning: false
25
+
26
+ # We recommend specifying your dependencies to enable reproducible builds:
27
+ # https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
28
+ python:
29
+ install:
30
+ - requirements: docs/requirements.txt
31
+
32
+ # Build PDF & ePub
33
+ formats:
34
+ - epub
35
+ - pdf
@@ -0,0 +1,31 @@
1
+ ==========
2
+ Change Log
3
+ ==========
4
+
5
+ This document records all notable changes to `fastcrc <https://github.com/overcat/fastcrc/>`_.
6
+
7
+ 0.3.1 (October 23, 2024)
8
+ * chore: add wheels for Python 3.13, pypy 3.8, pypy 3.9 and pypy 3.10.
9
+
10
+ 0.3.0 (January 2, 2024)
11
+ -----------------------
12
+ * feat: add support for 8 bit CRCs. (`#5 <https://github.com/overcat/fastcrc/pull/5>`_)
13
+ * chore: drop support for Python 3.6. (`#6 <https://github.com/overcat/fastcrc/pull/6>`_)
14
+
15
+ 0.2.1 (September 15, 2022)
16
+ ---------------------
17
+ * feat: add `fastcrc.crc16.ibm_refin` and `fastcrc.crc32.reversed_reciprocal_refin`, these are two experimental functions that may be removed in the future.
18
+ * chore: build wheels for more platforms.
19
+ * docs: improve documentation.
20
+
21
+ 0.2.0 (June 19, 2022)
22
+ ---------------------
23
+ * Add initial value optional parameter to all CRC functions. (`#1 <https://github.com/overcat/fastcrc/pull/1>`_)
24
+
25
+ 0.1.1 (May 23, 2021)
26
+ ---------------------
27
+ * Correct the project information.
28
+
29
+ 0.1.0 (May 23, 2021)
30
+ ---------------------
31
+ * First release.
@@ -0,0 +1,194 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 3
4
+
5
+ [[package]]
6
+ name = "autocfg"
7
+ version = "1.1.0"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
10
+
11
+ [[package]]
12
+ name = "cfg-if"
13
+ version = "1.0.0"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
16
+
17
+ [[package]]
18
+ name = "crc"
19
+ version = "3.2.1"
20
+ source = "registry+https://github.com/rust-lang/crates.io-index"
21
+ checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636"
22
+ dependencies = [
23
+ "crc-catalog",
24
+ ]
25
+
26
+ [[package]]
27
+ name = "crc-catalog"
28
+ version = "2.4.0"
29
+ source = "registry+https://github.com/rust-lang/crates.io-index"
30
+ checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
31
+
32
+ [[package]]
33
+ name = "fastcrc"
34
+ version = "0.3.1"
35
+ dependencies = [
36
+ "crc",
37
+ "paste",
38
+ "pyo3",
39
+ ]
40
+
41
+ [[package]]
42
+ name = "heck"
43
+ version = "0.5.0"
44
+ source = "registry+https://github.com/rust-lang/crates.io-index"
45
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
46
+
47
+ [[package]]
48
+ name = "indoc"
49
+ version = "2.0.5"
50
+ source = "registry+https://github.com/rust-lang/crates.io-index"
51
+ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5"
52
+
53
+ [[package]]
54
+ name = "libc"
55
+ version = "0.2.132"
56
+ source = "registry+https://github.com/rust-lang/crates.io-index"
57
+ checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5"
58
+
59
+ [[package]]
60
+ name = "memoffset"
61
+ version = "0.9.0"
62
+ source = "registry+https://github.com/rust-lang/crates.io-index"
63
+ checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"
64
+ dependencies = [
65
+ "autocfg",
66
+ ]
67
+
68
+ [[package]]
69
+ name = "once_cell"
70
+ version = "1.14.0"
71
+ source = "registry+https://github.com/rust-lang/crates.io-index"
72
+ checksum = "2f7254b99e31cad77da24b08ebf628882739a608578bb1bcdfc1f9c21260d7c0"
73
+
74
+ [[package]]
75
+ name = "paste"
76
+ version = "1.0.15"
77
+ source = "registry+https://github.com/rust-lang/crates.io-index"
78
+ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
79
+
80
+ [[package]]
81
+ name = "portable-atomic"
82
+ version = "1.9.0"
83
+ source = "registry+https://github.com/rust-lang/crates.io-index"
84
+ checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2"
85
+
86
+ [[package]]
87
+ name = "proc-macro2"
88
+ version = "1.0.89"
89
+ source = "registry+https://github.com/rust-lang/crates.io-index"
90
+ checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e"
91
+ dependencies = [
92
+ "unicode-ident",
93
+ ]
94
+
95
+ [[package]]
96
+ name = "pyo3"
97
+ version = "0.22.5"
98
+ source = "registry+https://github.com/rust-lang/crates.io-index"
99
+ checksum = "3d922163ba1f79c04bc49073ba7b32fd5a8d3b76a87c955921234b8e77333c51"
100
+ dependencies = [
101
+ "cfg-if",
102
+ "indoc",
103
+ "libc",
104
+ "memoffset",
105
+ "once_cell",
106
+ "portable-atomic",
107
+ "pyo3-build-config",
108
+ "pyo3-ffi",
109
+ "pyo3-macros",
110
+ "unindent",
111
+ ]
112
+
113
+ [[package]]
114
+ name = "pyo3-build-config"
115
+ version = "0.22.5"
116
+ source = "registry+https://github.com/rust-lang/crates.io-index"
117
+ checksum = "bc38c5feeb496c8321091edf3d63e9a6829eab4b863b4a6a65f26f3e9cc6b179"
118
+ dependencies = [
119
+ "once_cell",
120
+ "target-lexicon",
121
+ ]
122
+
123
+ [[package]]
124
+ name = "pyo3-ffi"
125
+ version = "0.22.5"
126
+ source = "registry+https://github.com/rust-lang/crates.io-index"
127
+ checksum = "94845622d88ae274d2729fcefc850e63d7a3ddff5e3ce11bd88486db9f1d357d"
128
+ dependencies = [
129
+ "libc",
130
+ "pyo3-build-config",
131
+ ]
132
+
133
+ [[package]]
134
+ name = "pyo3-macros"
135
+ version = "0.22.5"
136
+ source = "registry+https://github.com/rust-lang/crates.io-index"
137
+ checksum = "e655aad15e09b94ffdb3ce3d217acf652e26bbc37697ef012f5e5e348c716e5e"
138
+ dependencies = [
139
+ "proc-macro2",
140
+ "pyo3-macros-backend",
141
+ "quote",
142
+ "syn",
143
+ ]
144
+
145
+ [[package]]
146
+ name = "pyo3-macros-backend"
147
+ version = "0.22.5"
148
+ source = "registry+https://github.com/rust-lang/crates.io-index"
149
+ checksum = "ae1e3f09eecd94618f60a455a23def79f79eba4dc561a97324bf9ac8c6df30ce"
150
+ dependencies = [
151
+ "heck",
152
+ "proc-macro2",
153
+ "pyo3-build-config",
154
+ "quote",
155
+ "syn",
156
+ ]
157
+
158
+ [[package]]
159
+ name = "quote"
160
+ version = "1.0.37"
161
+ source = "registry+https://github.com/rust-lang/crates.io-index"
162
+ checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
163
+ dependencies = [
164
+ "proc-macro2",
165
+ ]
166
+
167
+ [[package]]
168
+ name = "syn"
169
+ version = "2.0.82"
170
+ source = "registry+https://github.com/rust-lang/crates.io-index"
171
+ checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021"
172
+ dependencies = [
173
+ "proc-macro2",
174
+ "quote",
175
+ "unicode-ident",
176
+ ]
177
+
178
+ [[package]]
179
+ name = "target-lexicon"
180
+ version = "0.12.16"
181
+ source = "registry+https://github.com/rust-lang/crates.io-index"
182
+ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
183
+
184
+ [[package]]
185
+ name = "unicode-ident"
186
+ version = "1.0.4"
187
+ source = "registry+https://github.com/rust-lang/crates.io-index"
188
+ checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd"
189
+
190
+ [[package]]
191
+ name = "unindent"
192
+ version = "0.2.3"
193
+ source = "registry+https://github.com/rust-lang/crates.io-index"
194
+ checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce"
@@ -0,0 +1,20 @@
1
+ [package]
2
+ name = "fastcrc"
3
+ version = "0.3.1"
4
+ authors = ["overcat <4catcode@gmail.com>"]
5
+ edition = "2021"
6
+ description = "A hyper-fast Python module for computing CRC(8, 16, 32, 64) checksum"
7
+ license = "MIT License"
8
+ repository = "https://github.com/overcat/fastcrc"
9
+ homepage = "https://github.com/overcat/fastcrc"
10
+ readme = "README.rst"
11
+ keywords = ["crc", "crc8", "crc16", "crc32", "crc64"]
12
+
13
+ [lib]
14
+ name = "fastcrc"
15
+ crate-type = ["cdylib"]
16
+
17
+ [dependencies]
18
+ pyo3 = "0.22.5"
19
+ crc = "3.2.1"
20
+ paste = "1.0.15"
@@ -1,14 +1,29 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: fastcrc
3
- Version: 0.2.1.dev8
4
- Summary: A hyper-fast Python module for computing CRC(16, 32, 64) checksum
5
- Keywords: crc,crc16,crc32,crc64
3
+ Version: 0.3.2
4
+ Classifier: Development Status :: 4 - Beta
5
+ Classifier: Intended Audience :: Developers
6
+ Classifier: License :: OSI Approved :: MIT License
7
+ Classifier: Operating System :: MacOS
8
+ Classifier: Operating System :: Microsoft :: Windows
9
+ Classifier: Operating System :: POSIX :: Linux
10
+ Classifier: Programming Language :: Rust
11
+ Classifier: Programming Language :: Python :: Implementation :: CPython
12
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
13
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
14
+ Classifier: Typing :: Typed
15
+ License-File: LICENSE
16
+ Summary: A hyper-fast Python module for computing CRC(8, 16, 32, 64) checksum
17
+ Keywords: crc,crc8,crc16,crc32,crc64
6
18
  Home-Page: https://github.com/overcat/fastcrc
7
19
  Author: overcat <4catcode@gmail.com>
8
20
  Author-email: overcat <4catcode@gmail.com>
9
21
  License: MIT License
22
+ Requires-Python: >=3.7
10
23
  Description-Content-Type: text/x-rst; charset=UTF-8
11
- Project-URL: Source Code, https://github.com/overcat/fastcrc
24
+ Project-URL: homepage, https://github.com/overcat/fastcrc
25
+ Project-URL: repository, https://github.com/overcat/fastcrc
26
+ Project-URL: documentation, https://fastcrc.readthedocs.io
12
27
 
13
28
  =======
14
29
  fastcrc
@@ -22,11 +37,11 @@ fastcrc
22
37
  :alt: PyPI
23
38
  :target: https://pypi.python.org/pypi/fastcrc
24
39
 
25
- .. image:: https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-blue?style=flat
40
+ .. image:: https://img.shields.io/badge/python-%3E%3D3.7-blue?style=flat
26
41
  :alt: Python - Version
27
42
  :target: https://pypi.python.org/pypi/fastcrc
28
43
 
29
- A hyper-fast Python module for computing CRC(16, 32, 64) checksum.
44
+ A hyper-fast Python module for computing CRC(8, 16, 32, 64) checksum.
30
45
 
31
46
 
32
47
  Installation
@@ -41,9 +56,10 @@ Usage
41
56
 
42
57
  .. code:: python
43
58
 
44
- from fastcrc import crc16, crc32, crc64
59
+ from fastcrc import crc8, crc16, crc32, crc64
45
60
 
46
61
  data = b"123456789"
62
+ print(f"crc8 checksum with cdma2000 algorithm: {crc8.cdma2000(data)}")
47
63
  print(f"crc16 checksum with xmodem algorithm: {crc16.xmodem(data)}")
48
64
  print(f"crc32 checksum with aixm algorithm: {crc32.aixm(data)}")
49
65
  print(f"crc64 checksum with ecma_182 algorithm: {crc64.ecma_182(data)}")
@@ -10,11 +10,11 @@ fastcrc
10
10
  :alt: PyPI
11
11
  :target: https://pypi.python.org/pypi/fastcrc
12
12
 
13
- .. image:: https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-blue?style=flat
13
+ .. image:: https://img.shields.io/badge/python-%3E%3D3.7-blue?style=flat
14
14
  :alt: Python - Version
15
15
  :target: https://pypi.python.org/pypi/fastcrc
16
16
 
17
- A hyper-fast Python module for computing CRC(16, 32, 64) checksum.
17
+ A hyper-fast Python module for computing CRC(8, 16, 32, 64) checksum.
18
18
 
19
19
 
20
20
  Installation
@@ -29,9 +29,10 @@ Usage
29
29
 
30
30
  .. code:: python
31
31
 
32
- from fastcrc import crc16, crc32, crc64
32
+ from fastcrc import crc8, crc16, crc32, crc64
33
33
 
34
34
  data = b"123456789"
35
+ print(f"crc8 checksum with cdma2000 algorithm: {crc8.cdma2000(data)}")
35
36
  print(f"crc16 checksum with xmodem algorithm: {crc16.xmodem(data)}")
36
37
  print(f"crc32 checksum with aixm algorithm: {crc32.aixm(data)}")
37
38
  print(f"crc64 checksum with ecma_182 algorithm: {crc64.ecma_182(data)}")
@@ -2,7 +2,7 @@ __title__ = "fastcrc"
2
2
  __description__ = "A hyper-fast Python module for computing CRC(16, 32, 64) checksum"
3
3
  __url__ = "https://github.com/overcat/fastcrc"
4
4
  __issues__ = f"{__url__}/issues"
5
- __version__ = "0.2.1-dev.8"
5
+ __version__ = "0.3.0"
6
6
  __author__ = "overcat"
7
7
  __author_email__ = "4catcode@gmail.com"
8
8
  __license__ = "MIT License"
@@ -1,4 +1,4 @@
1
- from . import crc16, crc32, crc64
1
+ from . import crc8, crc16, crc32, crc64
2
2
  from .__info__ import (
3
3
  __author__,
4
4
  __author_email__,