nullpunkt / lz-string-php

PHP Class implementation of LZ-String javascript
106 stars 54 forks source link

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: https://pieroxy.net/blog/pages/lz-string/index.html and is a 1:1 copy/translation into php.

Usage

<?php
\LZCompressor\LZString::compressToBase64($rawstr);

Installation

Composer

composer require nullpunkt/lz-string-php

Changelog

2021-06-17

2021-04-13

2016-03-23

2016-02-28

2016-02-25

2016-02-04

2014-03-12

2014-05-09