File: example.php

Recommend this page to a friend!
  Classes of Chi Hoang  >  PHP RLE Compression Algorithm  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example script
Class: PHP RLE Compression Algorithm
Compress and decompress data using RLE in pure PHP
Author: By
Last change:
Date: 5 years ago
Size: 528 bytes
 

Contents

Class file image Download
<?php
/*
* Copyright (c) 2014 Chi Hoang
* All rights reserved
*/
require_once("main.php");

$obj = new Compress\Rle("aaaabbcc","Encode");
$obj->start();
echo
$obj;
$obj->start("aabbcccccccccccde");
echo
$obj;

$obj = new Compress\Rle("a4b2c2","Decode");
$obj->start();
echo
$obj;

$obj = new Compress\Rle("aabb","Decode");
$obj->start();
echo
$obj;

$obj = new Compress\Rle("aabbccde","Encode");
$obj->start();
echo
$obj;

$obj = new Compress\Rle("aabbccdeaaaaaaaaaaaaaaae","Encode");
$obj->start();
echo
$obj;




?>


For more information send a message to info at phpclasses dot org.