Download the PHP package orware/compressed-string without Composer
On this page you can find all versions of the php package orware/compressed-string. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download orware/compressed-string
More information about orware/compressed-string
Files in orware/compressed-string
Package compressed-string
Short Description Based on the wonderful work by Tom Westcott (https://packagist.org/packages/cyberdummy/gzstream) which provided most of the functionality I required. Allows for gzip compressed string streams to be used for holding data. This project was created because I wanted a way to store large database result sets more easily in memory (especially ones that were just going to be output as JSON in an API response), since using a regular PHP array resulted in large memory usage.
License MIT
Informations about the package compressed-string
Compressed String Class for PHP
Based on the wonderful work by Tom Westcott (https://packagist.org/packages/cyberdummy/gzstream) which provided most of the functionality I required. Allows for gzip compressed string streams to be used for holding data. This project was created because I wanted a way to store large database result sets more easily in memory (especially ones that were just going to be output as JSON in an API response), since using a regular PHP array resulted in large memory usage.
Installation with Composer
OR
Usage
It's primarily intended to be used in a write forward way (primarily because going back to the beginning of a gzip string requires it to be decoded, so prepending should be discouraged from excessive use), but you do have the option to prepend text when needed:
There's also the ability to merge in one or more compressed strings into a "wrapper" string. In my case my wrapper contained some metadata about the JSON results.