PHPackages                             zhenhao/smaz - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. zhenhao/smaz

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zhenhao/smaz
============

PHP port of Smaz - a short string compression library

v1.1.1(10y ago)84.9k4[1 issues](https://github.com/zhenhao/smaz.php/issues)MITPHP

Since Nov 3Pushed 10y agoCompare

[ Source](https://github.com/zhenhao/smaz.php)[ Packagist](https://packagist.org/packages/zhenhao/smaz)[ RSS](/packages/zhenhao-smaz/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

smaz.php
--------

[](#smazphp)

PHP port of Smaz - a short string compression library

### php test.php

[](#php-testphp)

```
-50%	http://www.baidu.com
-50%	This is a small string
+9.09%	THIS IS A SMALL STRING
-48.15%	Nothing is more difficult, and therefore more precious, than to be able to decide
-45.24%	http://github.com/antirez/smaz/tree/master
-15.38%	1000 numbers 2000 will 10 20 30 compress very little
+0%	good
+25%	luck
+7.41%	好好学习，天天向上
+2.9%	白日依山尽，黄河入海流，欲穷千里目，更上一层楼

```

### require from composer

[](#require-from-composer)

```
1. composer require zhenhao/smaz
2. try...
