PHPackages                             jezevec10/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. jezevec10/lz-string-php

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

jezevec10/lz-string-php
=======================

PHP Class implementation of LZ-String javascript.

v1.2.1(6y ago)1171PHPPHP &gt;=5.3.0

Since Feb 25Pushed 6y agoCompare

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

READMEChangelogDependencies (2)Versions (7)Used By (0)

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

[](#lz-string-php)

PHP Class implementation of LZ-String javascript ()

lz-string was designed to fulfill the need of storing large amounts of data in localStorage, specifically on mobile devices. localStorage being usually limited to 5MB, all you can compress is that much more data you can store. In case you want to transfer your stored data from / to a php backend 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)

```
