# Implement lzma (xz?) compression (was Req #63880)

- Thread: https://externals.io/message/106651
- Original archive: https://news-web.php.net/php.internals/106651
- Started by Tobias Frei on 2019-08-19T10:47:47+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #106651 — Tobias Frei — 2019-08-19T10:47:47+00:00

URL: https://externals.io/message/106651#106651

Hi,

Today I was asked to contact this list about the 2013-01-01 proposal  
described in Feature Request 63880.

https://bugs.php.net/bug.php?id=63880

Please implement some kind of lzma compression, e.g. xz or lzip,  
alongside gzip and bzip2 in php.

The original proposal asked for xz compression; it seems that one may  
argue in favor of a different implementation such as lzip for reasons  
I found today at
https://www.nongnu.org/lzip/xz_inadequate.html

My request, although originally made for xz compression, is about  
implementing lzma (or any kind of modern, strong) compression in php  
to hopefully easily replace bzip2 in user applications, such as  
phpBB's database backup function.

Anyone may freely open an RFC or onwiki discussion about this on my  
behalf whenever they like to, and even if they read this message  
multiple years later.

Best regards
Tobias Frei

---

## #106652 — Pierre Joye — 2019-08-19T11:40:24+00:00

URL: https://externals.io/message/106651#106652 · In reply to: #106651

Good afternoon,


there was an extension but seems not maintained (
https://github.com/payden/php-xz/blob/master/README.md). It should not be
too hard to port to 7.

best,
Pierre



> Hi,
>
> Today I was asked to contact this list about the 2013-01-01 proposal
> described in Feature Request 63880.
>
> https://bugs.php.net/bug.php?id=63880
>
> Please implement some kind of lzma compression, e.g. xz or lzip,
> alongside gzip and bzip2 in php.
>
> The original proposal asked for xz compression; it seems that one may
> argue in favor of a different implementation such as lzip for reasons
> I found today at
> https://www.nongnu.org/lzip/xz_inadequate.html
>
> My request, although originally made for xz compression, is about
> implementing lzma (or any kind of modern, strong) compression in php
> to hopefully easily replace bzip2 in user applications, such as
> phpBB's database backup function.
>
> Anyone may freely open an RFC or onwiki discussion about this on my
> behalf whenever they like to, and even if they read this message
> multiple years later.
>
> Best regards
> Tobias Frei

---

## #106653 — Christoph M. Becker — 2019-08-19T12:42:57+00:00

URL: https://externals.io/message/106651#106653 · In reply to: #106651

Hi!



> Today I was asked to contact this list about the 2013-01-01 proposal
> described in Feature Request 63880.
>
> https://bugs.php.net/bug.php?id=63880
>
> Please implement some kind of lzma compression, e.g. xz or lzip,
> alongside gzip and bzip2 in php.
>
> The original proposal asked for xz compression; it seems that one may
> argue in favor of a different implementation such as lzip for reasons I
> found today at
> https://www.nongnu.org/lzip/xz_inadequate.html
>
> My request, although originally made for xz compression, is about
> implementing lzma (or any kind of modern, strong) compression in php to
> hopefully easily replace bzip2 in user applications, such as phpBB's
> database backup function.
>
> Anyone may freely open an RFC or onwiki discussion about this on my
> behalf whenever they like to, and even if they read this message
> multiple years later.

Thanks for bringing this topic to internals@!

In my opinion, this extension should start as PECL extension.  This
would allow it to be developed independently of the PHP release cycle,
and the API could be adapted if necessary.  After the extension has been
stabilized, and if the extension turns out to be generally useful, it
still could be bundled.

Thanks,
Christoph

---

## #106654 — Joe Watkins — 2019-08-19T13:42:07+00:00

URL: https://externals.io/message/106651#106654 · In reply to: #106653

Afternoon,

Patch for php7:
https://gist.github.com/krakjoe/549ec38161ecd1ad9b8f16f6cf18657e

Run with it, or not ...

Cheers
Joe




> Hi!
>
> 
>
> > […]
>
> Thanks for bringing this topic to internals@!
>
> In my opinion, this extension should start as PECL extension.  This
> would allow it to be developed independently of the PHP release cycle,
> and the API could be adapted if necessary.  After the extension has been
> stabilized, and if the extension turns out to be generally useful, it
> still could be bundled.
>
> Thanks,
> Christoph

---

## #106655 — Joe Watkins — 2019-08-19T13:45:57+00:00

URL: https://externals.io/message/106651#106655 · In reply to: #106654

Note, while reading the code I noticed it doing some odd things with
strings (see casting away constness in patch) ... this wants a maintainer,
I was just getting the build going [and not volunteering] ...

Cheers
Joe

PS. Sorry about double post ...



> Afternoon,
>
> Patch for php7:
> https://gist.github.com/krakjoe/549ec38161ecd1ad9b8f16f6cf18657e
>
> Run with it, or not ...
>
> Cheers
> Joe
>
>
> On Mon, 19 Aug 2019 at 14:43, Christoph M. Becker <cmbecker69@gmx.de>
> wrote:
>
> > […]
