PHPackages                             kny00/lzutf8-php - 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. kny00/lzutf8-php

ActiveLibrary

kny00/lzutf8-php
================

Lzutf8 implementation for php

011PHP

Since May 15Pushed 5y ago1 watchersCompare

[ Source](https://github.com/KNY00/lzutf8-php)[ Packagist](https://packagist.org/packages/kny00/lzutf8-php)[ RSS](/packages/kny00-lzutf8-php/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![License](https://camo.githubusercontent.com/e27766cd9d3e4a47e2cd1f421112f1258276fd847fc4a80eb246850dbd007b8e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c76322d627269676874677265656e "License")](https://camo.githubusercontent.com/e27766cd9d3e4a47e2cd1f421112f1258276fd847fc4a80eb246850dbd007b8e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c76322d627269676874677265656e)[![License](https://camo.githubusercontent.com/dd9ee77577bffa89abdd0cb621acf45257c7bf609e809283e2b0163a4da76d0c/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d504850266d6573736167653d372e32253743372e3326636f6c6f723d373337386165 "Version")](https://camo.githubusercontent.com/dd9ee77577bffa89abdd0cb621acf45257c7bf609e809283e2b0163a4da76d0c/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d504850266d6573736167653d372e32253743372e3326636f6c6f723d373337386165)[![License](https://camo.githubusercontent.com/233c90f60f15c7d266a56884b3164f5cc8e71f496c1bc63f0ddc4026cac4a69c/68747470733a2f2f6170692e7472617669732d63692e636f6d2f4b4e5930302f6c7a757466382d7068702e7376673f6272616e63683d6d6173746572 "travis ci") ](https://travis-ci.com/KNY00/lzutf8-php/builds/143966512)[![codecov](https://camo.githubusercontent.com/17b9916e905961b6a86fd061c892f8f6db2dd9bf8ea1014e68708dd9d0733cae/68747470733a2f2f636f6465636f762e696f2f67682f4b4e5930302f6c7a757466382d7068702f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/KNY00/lzutf8-php)

lzutf8-php
==========

[](#lzutf8-php)

PHP Decompressor for [LZ-UTF8](https://github.com/rotemdan/lzutf8.js)

LZ-UTF8 is a string compression library and format. Is an extension to the UTF-8 character encoding, augmenting the [UTF-8](https://en.wikipedia.org/wiki/UTF-8) bytestream with optional compression based the [LZ77](https://en.wikipedia.org/wiki/LZ77_and_LZ78) algorithm.

Compatibility
=============

[](#compatibility)

Code was tested on PHP `7.2` and `7.3`

PHPUnit 8.5 test requires PHP &gt;= 7.2

Getting started
===============

[](#getting-started)

Set Up
------

[](#set-up)

### Via Composer

[](#via-composer)

Include it to your project via `composer.json` after adding the folder to your current project.

> This package is not available yet on packagist. So you have to install it manually

```
{
    "repositories": [
        {
            "type": "path",
            "url": "kny00/lzutf8-php",
            "options": {
                "symlink": true
            }
        }
    ],
    "require": {
        "kny00/lzutf8-php": "0.0.1",
        "ext-mbstring": "*"
    }
}
```

Then update composer

```
composer update
```

### Via Include

[](#via-include)

This is a one class script, so you can simply include it to your current project

```
include "kny00/lzutf8/src/Lzutf8/Lzutf8.php"
```

Use it
------

[](#use-it)

```
use use Knaya\Lzutf8\Lzutf8 as Lzutf8;

/**
 * Creating a compressed 9 chars string
 * 2 last bytes contain a codepoint sequence
 * [206, 7]
 * distance should be equal to 7 and length to 14
 */
$compressedArray = [
    65, 66, 67, 68, 69, 70, 71, 206, 7
];
$compressedStr = call_user_func_array(
    "pack",
    array_merge(array("C*"), $compressedArray)
    );

$class = new Lzutf8();
$decompressed = $class->decompress($compressedStr);
// Decompress outputs 21 UTF-8 chars
```

License
=======

[](#license)

Copyright (c) 2020, KNY &lt;&gt;.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 60% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/83fe2758db4441de720e059850df951dea482fafd32337c1dbf728c9062fc9f2?d=identicon)[KNY00](/maintainers/KNY00)

---

Top Contributors

[![KNY00](https://avatars.githubusercontent.com/u/32478933?v=4)](https://github.com/KNY00 "KNY00 (3 commits)")[![wesnick](https://avatars.githubusercontent.com/u/519946?v=4)](https://github.com/wesnick "wesnick (2 commits)")

### Embed Badge

![Health badge](/badges/kny00-lzutf8-php/health.svg)

```
[![Health](https://phpackages.com/badges/kny00-lzutf8-php/health.svg)](https://phpackages.com/packages/kny00-lzutf8-php)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
