Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: bzcompress - Manual
[go: Go Back, main page]

PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<bzclosebzdecompress" width="11" height="7"/>
view the version of this page
Last updated: Sun, 07 May 2006

bzcompress

(PHP 4 >= 4.3.3, PHP 5)

bzcompress -- 文字列をbzip2形式のデータに圧縮する

説明

mixed bzcompress ( string source [, int blocksize [, int workfactor]] )

bzcompress() は、与えられた文字列を圧縮し、 bzip2 形式のデータとして返します。

パラメータ

source

圧縮する文字列

blocksize

圧縮時のブロック長を指定します。 1 から 9 の数とする必要があります。この場合、9 の圧縮度が最大ですが、リソースの消費量も最大となります。 blocksize のデフォルトは 4 です。

workfactor

繰り返しが多い、最悪の入力データの場合の圧縮処理の動作を制御します。 この値は、0 から 250 までとなり、0 は特別な場合、30 はデフォルト値となります。

workfactor によらず、 生成される出力は同じになります。

返り値

圧縮された文字列、もしくはエラー時はエラー数

例 1. データの圧縮

<?php
$str
= "sample data";
$bzstr = bzcompress($str, 9);
echo
$bzstr;
?>


add a note add a note User Contributed Notes
bzcompress
There are no user contributed notes for this page.

<bzclosebzdecompress" width="11" height="7"/>
 Last updated: Sun, 07 May 2006
show source | credits | sitemap | contact | advertising | mirror sites 
Copyright © 2001-2006 The PHP Group
All rights reserved.
This mirror generously provided by: PacketBusiness, Inc.
Last updated: Wed May 10 19:19:26 2006 JST