juanchosl/compression

Grouped tools in order to abstract compression tasks compatible with few formats and encodings.

Maintainers

Package info

github.com/JuanchoSL/Compression

pkg:composer/juanchosl/compression

Transparency log

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 1

1.0.x-dev 2026-08-22 11:48 UTC

This package is auto-updated.

Last update: 2026-08-22 11:48:50 UTC


README

Description

Little methods collection in order to compress/uncompress strings or create/manage compressed files

Install

composer require juanchosl/compression

Data Compression

At first, we can compress/uncompress strings, it is not needed that use a regular file, can be used from/to http messages directly.

How to use

We can select from few extensions, in order to change the format between the available extensions or the specyfic need, with no code changes.

Plain text/data

Compress

$format = new CompressionBrotli($level = 8);
$compressed_text = $format->compress($uncompressed_text);

Uncompress

$format = new CompressionZstd();
$uncompressed_text = $format->decompress($compressed_text);