Download the PHP package codemasher/php-ext-xz without Composer

On this page you can find all versions of the php package codemasher/php-ext-xz. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-ext-xz

php-ext-xz

PHP Extension providing XZ (LZMA2) compression/decompression functions (see Implement lzma (xz?) compression).

Linux build Windows build Packagist version

Installation

The recommended way to install the extension is using PIE:

Windows builds are now done automatically; you can download them from the releases. Copy the dll file into the /ext directory of your PHP installation and add the line extension=xz-1.x.x-8.5-ts-vs17-x86_64 to your php.ini (whatever the filename may be, you may omit the leading "php_" and the extension), see also: Loading an extension in the PHP manual.

You can check if the extension is loaded via phpinfo(), or from within PHP via:

Basic usage

String-based operations

You can easily compress and decompress strings.

File-based operations

The extension also supports stream-based operations for working with .xz files.

Configuration

You can configure the default compression level and memory limit:

Alternatively, the compression level can be supplied as a parameter to the xzencode() and xzopen() functions:

Build from source

Linux

This module requires liblzma-dev (https://tukaani.org/xz/) as well as php7-dev or php8-dev. If you are using Ubuntu, you can easily install all of them by typing the following command in your terminal:

To build and install as module, perform the following steps:

Do not forget to add extension=xz.so to your php.ini.

Windows

If you want to build it on your own, follow the steps under "Build your own PHP on Windows" to setup your build environment. Before the compilation step, clone this repository to [...]\php-src\ext\xz and proceed.

Run the buildtree script and check out the php source:

Clone the xz extension and run the build:

Please note that the liblzma dependency is not included with PHP < 8, so you will need to download it manually and extract it into the deps directory.

Disclaimer

May or may not contain bugs. Use at your own risk.


All versions of php-ext-xz with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package codemasher/php-ext-xz contains the following files

Loading the files please wait ...