nullpunkt/lz-string-php
LZ-string compression and decompression for PHP, letting you store and share compressed strings in URLs or localStorage with full compatibility with the JavaScript lz-string library.
localStorage, URL fragments, cookies, embedded JSON, or legacy fields compressed by lz-string.js. It is a poor fit for new backend-only compression, queue payloads, database blobs, or large files; use gzip/zlib/zstd there.compressToBase64, compressToUTF16, compressToEncodedURIComponent), and version drift between JS and PHP implementations. Secondary risks are abandonment, unverified PHP 8.x compatibility, unclear license/source provenance, low adoption at 111 stars, and decompression of untrusted input causing memory expansion or malformed-input failures.lz-string version and encoding variant produced it? What PHP versions and extensions are in production? What are the maximum payload sizes and trust boundaries? Can we fork/vendor the package if needed? What is the exit plan if the package is abandoned? For new data, can we use gzip plus base64 or a standard format instead?LzStringCodecInterface, with one implementation wrapping the package. Add config for encoding variant and size limits. Do not leak the package API into domain code. Use it at HTTP boundaries, middleware, or import/export jobs only where JS compatibility is required.lz-string version and assert PHP round-trips and cross-language decode. Test base64, UTF-16, URI-safe, and raw variants explicitly. Confirm license and source provenance before production use.How can I help you explore Laravel packages today?