json-zlib/compressor

A library to (de-)compress JSON strings using `zlib`.

v1.0.0 2022-10-06 16:06 UTC

This package is auto-updated.

Last update: 2024-11-06 20:41:22 UTC


README

A library to (de-)compress JSON strings using zlib.

Installation

composer require json-zlib/compressor

Usage

use Json\ZlibCompressor;

$data = [
    'test' => 12,
    'key' => [1, 2, 3],
];

\assert(
    $data === ZlibCompressor::inflate(ZlibCompressor::deflate($data)),
);