Skip to content
Native LZW encoding and decoding for PHP
C PHP JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests
.gitignore
CREDITS
EXPERIMENTAL
README.md
config.m4
config.w32
lzw.c
lzw.php
patchlevel.h
php_lzw.h

README.md

lzw-ext

Native LZW encoding and decoding for PHP

WARNING: This is currently an alpha release.

Overview

These functions use the LZW implementation from https://github.com/vapier/ncompress

/**
 * Compress $inputPath file using LZW compression.
 * Write the compressed output to $outputPath.
 */
bool function lzw_compress_file($inputPath, $outputPath);

/**
 * Decompress $outputPath file using LZW compression.
 * Write the decompressed file to $outputPath.
 */
bool function lzw_decompress_file($inputPath, $outputPath);

Installation

Installation is the same as any PHP extension

  • Download the source
  • cd into the unpacked source directory
  • phpize
  • ./configure --enable-lzw
  • make
  • sudo make install
You can’t perform that action at this time.