Đang Thực Hiện

116642 Compress/Decompress Functions

I need two PHP functions coded to compress an ASCII string of length between 0 to 256 characters to a "compressed" output string of 8 (or less) alpha-numeric characters.


Function Compress($string)

Function Decompress ($string)

Usage example:

$str = "This is a long string that may contain any printable ASCII characters, including but not limiting to ~!#$%':232\"()_+. and escaped characters"

$cstr = compress($str)

echo $cstr // This should display an alpha-numeric string of 8 char or less.

$dstr = decompress($cstr)

echo $dstr // This should display the same content as $str

Kĩ năng: Bất kì công việc gì, PHP

Xem nhiều hơn: compress string, str, decompress, php string contain, string function, php functions compress string, php decompress functions, php char, cstr, compress numeric string, compress ascii string php, alpha numeric, 232, php compress string example, compress, php compress decompress, php ascii compress string, compress php string, php compress string printable, functions, decompress php, php str, php compress, php decompress string, compress string php

Về Bên Thuê:
( 0 nhận xét )

ID dự án: #1862809