lizongying / lzy-codec
一種變長文本編解碼方案,支持對Unicode進行編解碼。編解碼效率、存儲空間全面優於UTF-8,未來會替代UTF-8成為新的世界通用編解碼標準。
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/lizongying/lzy-codec
Requires
- php: >=7.4
This package is auto-updated.
Last update: 2026-01-08 09:58:53 UTC
README
一種變長文本編解碼方案,支持對Unicode進行編解碼。編解碼效率、存儲空間全面優於UTF-8,未來會替代UTF-8成為新的世界通用編解碼標準。 php實現。
更多cli工具請參考 go
Other languages
Install
composer require lizongying/lzy-codec dev-main
Test
php tests/test.php
Examples
src/example.php
<?php require_once __DIR__ . '/../vendor/autoload.php'; use LZYCodec\LZY; try { $test_str = "Hello 世界!😀"; $lzy_bytes = LZY::encode_from_string($test_str); $decoded_str = LZY::decode_to_string($lzy_bytes); var_dump($test_str === $decoded_str); // bool(true) } catch (Exception $e) { echo "错误:" . $e->getMessage(); }