data-encode-tool
useage
import data_encode_tool
num = "01234567890123"
data = data_encode_tool.encode_u40(num)
ret = data_encode_tool.decode_u40(data)
assert ret==num
gene = "ATCG"
data = data_encode_tool.encode_gene(gene)
ret = data_encode_tool.decode_gene(data)
assert ret==gene
gene text encode
基因文本包含4个元素 ATCG ,将4个基因编码到一个 bytes, 基因数据末尾不足4个元素的,添加一个bytes标记多余基因
number text encode
对数值文本进行编码, 包括 0,1,2,3,4,5,6,7,8,9,. 十一个文本,使用 u40 作为数值编码基础,u40 的范围是 0~1_099_511_627_775, 编码工具只使用前12位对数值进行编码,每次编码12位数值,超过12位的编码空间对小数点和不足12位的数值进行编码
Metadata
Release files for data-encode-tool 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| data_encode_tool-0.0.1.tar.gz | 6.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| data_encode_tool-0.0.1-cp39-cp39-manylinux_2_28_x86_64.whl | CPython 3.9 | CPython 3.9 | Linux glibc 2.28+ x86-64 | Details |
Total release size: 241.0 kB
Release files / data_encode_tool-0.0.1.tar.gz
| Download URL | data_encode_tool-0.0.1.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ddeb086f4eedd8b92f53e038b57d380a6f728e19e4ccc3876519a5662803fb9b
|
|
BLAKE2b-256 checksum How to use checksums |
00f2d06e3f3a540f669ed0cf442ec8a6a2fcd97b7961df6669b10326b1f60942
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.5.1
|
Release files / data_encode_tool-0.0.1-cp39-cp39-manylinux_2_28_x86_64.whl
| Download URL | data_encode_tool-0.0.1-cp39-cp39-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 235.0 kB |
| Tags | CPython 3.9 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
12909c5987efbd77a0e76a330b359c77f50b781382eca6c5091b83529b4ef3b5
|
|
BLAKE2b-256 checksum How to use checksums |
381ebc8bc101e91ea0205fcdd2c50b30eea08b14172b73a87ff0ac338e92ca05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.5.1
|