333


توضیحات

字节、字符串与文件哈希,附带低成本的文件比对。
ویژگی مقدار
سیستم عامل OS Independent
نام فایل 333-0.0.4
نام 333
نسخه کتابخانه 0.0.4
نگهدارنده []
ایمیل نگهدارنده []
نویسنده -
ایمیل نویسنده lqxnjk <lqxnjk@qq.com>
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/333/
مجوز MIT
# 333 [English](#english) | 中文 字节、字符串与文件哈希,附带低成本的文件比对。 ## 安装 ```console pip install 333 ``` ## 用法 ```python from p333 import compare_files, hash_bytes, hash_file hash_bytes("abc") # blake2b hash_bytes(b"abc", n_algo="sha256") hash_file("big.iso") # 1 MiB 分块 hash_file("big.iso", n_algo="md5", n_chunk=4 << 20) compare_files("a.bin", "b.bin") # True / False ``` ## 说明 包名以数字开头,导入名是 `p333`。支持 `blake2b`(默认,最快)、`sha256`、`sha1`、`md5`;文件按块流式读取。`compare_files` 先比大小,大小不同一个 `stat` 就返回,不读内容。 ## 许可证 MIT --- <a id="english"></a> ## English Hashing for files and bytes across several algorithms. ## Install ```console pip install 333 ``` ## Usage ```python from p333 import compare_files, hash_bytes, hash_file hash_bytes("abc") # blake2b hash_bytes(b"abc", n_algo="sha256") hash_file("big.iso") # 1 MiB 分块 hash_file("big.iso", n_algo="md5", n_chunk=4 << 20) compare_files("a.bin", "b.bin") # True / False ``` ## Notes The distribution name starts with a digit, so the import name is `p333`. Algorithms: `blake2b` (default, fastest), `sha256`, `sha1`, `md5`. `compare_files` compares sizes first, so unequal files cost one `stat` instead of two full reads. ## License MIT


زبان مورد نیاز

مقدار نام
>=3.10 Python


نحوه نصب


نصب پکیج whl 333-0.0.4:

    pip install 333.whl


نصب پکیج tar.gz 333-0.0.4:

    pip install 333.tar.gz