PHPackages                             pinimize/laravel-lzf-compresssion - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. pinimize/laravel-lzf-compresssion

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

pinimize/laravel-lzf-compresssion
=================================

A Laravel package for compression with lzf.

v0.1.0(1y ago)04[3 PRs](https://github.com/pinimize/laravel-lzf-compresssion/pulls)MITPHPPHP ^8.2CI passing

Since Aug 27Pushed 1y agoCompare

[ Source](https://github.com/pinimize/laravel-lzf-compresssion)[ Packagist](https://packagist.org/packages/pinimize/laravel-lzf-compresssion)[ Docs](https://github.com/pinimize/laravel-lzf-compresssion)[ RSS](/packages/pinimize-laravel-lzf-compresssion/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (10)Versions (5)Used By (0)

Pinimize LZF Extension
======================

[](#pinimize-lzf-extension)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e8d7faad70e6ed12d5268a0693a7eb6ce050d0caa3a4400a4d68f0581d8a7608/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70696e696d697a652f6c61726176656c2d6c7a662d636f6d707265737373696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pinimize/laravel-lzf-compresssion)[![Tests](https://github.com/pinimize/laravel-lzf-compresssion/actions/workflows/phpunit.yml/badge.svg?branch=main)](https://github.com/pinimize/laravel-lzf-compresssion/actions/workflows/phpunit.yml)[![License](https://camo.githubusercontent.com/9e8ac936a350dc4f273879a1ac35da53788077561c7a09b688650d6f9f573e37/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f70696e696d697a652f6c61726176656c2d6c7a662d636f6d707265737373696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pinimize/laravel-lzf-compresssion)

This package provides LZF compression support for the Pinimize compression and archive package for Laravel.

Requirements
------------

[](#requirements)

- PHP 8.2 or higher
- Laravel 11 or higher
- The `ext-lzf` PHP extension must be installed and enabled

Installation
------------

[](#installation)

First, ensure that the LZF PHP extension is installed. You can check this by running:

```
php -m | grep lzf
```

If you don't see 'lzf' in the output, you'll need to install the extension before proceeding.

Once the LZF extension is installed, you can install the package via composer:

```
composer require pinimize/laravel-lzf-compresssion
```

Prerequisites
-------------

[](#prerequisites)

This package is an extension of the [Pinimize Compression and Archive](https://github.com/pinimize/laravel-compression-and-archive) package. The main Pinimize package will be automatically installed as a dependency for this package.

Configuration
-------------

[](#configuration)

After installation, you need to add the LZF driver configuration to your `config/pinimize.php` file. If you haven't published th main config file, you can do so by running this command:

```
php artisan vendor:publish --provider="Pinimize\PinimizeServiceProvider" --tag="config"
```

Add the following to the `drivers` array:

```
'lzf' => [
    'disk' => env('COMPRESSION_DISK', null),
],
```

Your complete compression configuration should look something like this:

```
'compression' => [
    'default' => env('COMPRESSION_DRIVER', 'gzip'),
    'mixin' => env('COMPRESSION_REGISTER_MIXIN', true),
    'drivers' => [
        ... // Other drivers
        'lzf' => [
            'disk' => env('COMPRESSION_DISK', null),
        ],
    ],
],
```

Usage
-----

[](#usage)

Once configured, you can use the LZF driver just like any other compression driver in Pinimize. All methods available in the main Pinimize package are fully supported with the LZF driver. For example:

```
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Storage;
use Pinimize\Facades\Compression;
use Pinimize\Facades\Decompression;

// When you have made lzf the default driver in your configuration:
$compressedStringZlib = Str::compress($originalString);
$decompressedStringGzip = Str::decompress($compressedStringGzip);

// By specifying the driver:
$compressedStringZlib = Str::compress($originalString, 'lzf');
$decompressedStringGzip = Str::decompress($compressedStringGzip, 'lzf');

// Or with the Storage facade:
Storage::compress('/path/to/original.json', '/path/to/compressed.json.lzf');
Storage::decompress('/path/to/compressed.json.lzf', '/path/to/decompressed.json');

// Compress a string using LZF
$compressed = Compression::driver('lzf')->string('Hello, World!');

// Default driver
$compressed = Compression::string('Hello, World!');
Compression::put('path/to/compressed.csv.lzf', '/path/to/original.csv');
```

For more detailed usage instructions and a full list of available methods, please refer to the [Pinimize Compression and Archive documentation](https://github.com/pinimize/laravel-compression-and-archive).

Important Notes
---------------

[](#important-notes)

1. The LZF compression algorithm does not support compression levels. The `level` parameter in the configuration is ignored for the LZF driver.
2. The LZF extension must be installed on your server for this package to work. If you're using a managed hosting service, you may need to contact your hosting provider to have it installed.

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

Testing
-------

[](#testing)

Run the tests with:

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Einar Hansen](https://github.com/einar-hansen)
- [All Contributors](https://github.com/pinimize/laravel-compression-and-archive/graphs/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

675d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7867c8e6cb949ab73460f6189d49e8423431864c495a389e650e82509e44d954?d=identicon)[einar-hansen](/maintainers/einar-hansen)

---

Top Contributors

[![einar-hansen](https://avatars.githubusercontent.com/u/49709354?v=4)](https://github.com/einar-hansen "einar-hansen (11 commits)")

---

Tags

laravelcompressionpinimizelzf

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/pinimize-laravel-lzf-compresssion/health.svg)

```
[![Health](https://phpackages.com/badges/pinimize-laravel-lzf-compresssion/health.svg)](https://phpackages.com/packages/pinimize-laravel-lzf-compresssion)
```

###  Alternatives

[stephenjude/filament-blog

Filament Blog Builder

20619.4k](/packages/stephenjude-filament-blog)[mmanos/laravel-casset

An asset management package for Laravel 4.

102.6k](/packages/mmanos-laravel-casset)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
