PHPackages                             nullpunkt/lz-string-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. nullpunkt/lz-string-php

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

nullpunkt/lz-string-php
=======================

PHP Class implementation of LZ-String javascript.

1.3.0(4y ago)111520.6k↓43%51[10 issues](https://github.com/nullpunkt/lz-string-php/issues)[1 PRs](https://github.com/nullpunkt/lz-string-php/pulls)20PHPPHP &gt;=5.4CI failing

Since Feb 25Pushed 4y ago7 watchersCompare

[ Source](https://github.com/nullpunkt/lz-string-php)[ Packagist](https://packagist.org/packages/nullpunkt/lz-string-php)[ RSS](/packages/nullpunkt-lz-string-php/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (6)Dependencies (2)Versions (8)Used By (20)

lz-string-php
=============

[](#lz-string-php)

lz-string is designed to fulfill the need of storing large amounts of data in localStorage, specifically on mobile devices. Due to the limitation of a maximum of 5MB in the local storage one possible solution is to compress the data right before storing it locally. In case you want to transfer your stored data from / to a php service you can use this library to (en)code the data.

This code is originally based on the LZ-String javascript version found here: and is a 1:1 copy/translation into php.

Usage
-----

[](#usage)

```
