问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

php gzencode函数需要扩展吗

发布网友 发布时间:2022-04-24 04:00

我来回答

3个回答

热心网友 时间:2023-10-26 12:12

gzencode

(PHP 4 >= 4.0.4, PHP 5)

gzencode — Create a gzip compressed string

说明
string gzencode ( string $data [, int $level = -1 [, int $encoding_mode = FORCE_GZIP ]] )
This function returns a compressed version of the input data compatible with the output of the gzip program.

For more information on the GZIP file format, see the document: » GZIP file format specification version 4.3 (RFC 1952).

参数
data
The data to encode.

level
The level of compression. Can be given as 0 for no compression up to 9 for maximum compression. If not given, the default compression level will be the default compression level of the zlib library.

encoding_mode
The encoding mode. Can be FORCE_GZIP (the default) or FORCE_DEFLATE.

Prior to PHP 5.4.0, using FORCE_DEFLATE results in a standard zlib deflated string (inclusive zlib headers) after a gzip file header but without the trailing crc32 checksum.

In PHP 5.4.0 and later, FORCE_DEFLATE generates RFC 1950 compliant output, consisting of a zlib header, the deflated data, and an Adler checksum.

返回值
The encoded string, or FALSE if an error occurred.

更新日志
版本说明
5.4.0FORCE_DEFLATE now generates RFC 1950 compliant output.
4.2.0The encoding_mode parameter was added
范例
The resulting data contains the appropriate headers and data structure to make a standard .gz file, e.g.:

Example #1 Creating a gzip file

<?php
$data = implode("", file("bigfile.txt"));
$gzdata = gzencode($data, 9);
$fp = fopen("bigfile.txt.gz", "w");
fwrite($fp, $gzdata);
fclose($fp);
?>
参见
gzdecode() - Decodes a gzip compressed string
gzdeflate() - Deflate a string
gzinflate() - Inflate a deflated string
gzuncompress() - Uncompress a compressed string
gzcompress() - Compress a string
» ZLIB Compressed Data Format Specification (RFC 1950)

gzeof> <gzdeflate
[edit] Last updated: Sat, 17 Nov 2012

热心网友 时间:2023-10-26 12:12

在java中用Inflater.setInput()输入PHP传来的码文,用Inflater.inflate()解压出原文. 再用new String(原文, "GBK");转换成java字符串。

热心网友 时间:2023-10-26 12:12

gzencode

(PHP 4 >= 4.0.4, PHP 5)

gzencode — Create a gzip compressed string

说明
string gzencode ( string $data [, int $level = -1 [, int $encoding_mode = FORCE_GZIP ]] )
This function returns a compressed version of the input data compatible with the output of the gzip program.

For more information on the GZIP file format, see the document: » GZIP file format specification version 4.3 (RFC 1952).

参数
data
The data to encode.

level
The level of compression. Can be given as 0 for no compression up to 9 for maximum compression. If not given, the default compression level will be the default compression level of the zlib library.

encoding_mode
The encoding mode. Can be FORCE_GZIP (the default) or FORCE_DEFLATE.

Prior to PHP 5.4.0, using FORCE_DEFLATE results in a standard zlib deflated string (inclusive zlib headers) after a gzip file header but without the trailing crc32 checksum.

In PHP 5.4.0 and later, FORCE_DEFLATE generates RFC 1950 compliant output, consisting of a zlib header, the deflated data, and an Adler checksum.

返回值
The encoded string, or FALSE if an error occurred.

更新日志
版本说明
5.4.0FORCE_DEFLATE now generates RFC 1950 compliant output.
4.2.0The encoding_mode parameter was added
范例
The resulting data contains the appropriate headers and data structure to make a standard .gz file, e.g.:

Example #1 Creating a gzip file

<?php
$data = implode("", file("bigfile.txt"));
$gzdata = gzencode($data, 9);
$fp = fopen("bigfile.txt.gz", "w");
fwrite($fp, $gzdata);
fclose($fp);
?>
参见
gzdecode() - Decodes a gzip compressed string
gzdeflate() - Deflate a string
gzinflate() - Inflate a deflated string
gzuncompress() - Uncompress a compressed string
gzcompress() - Compress a string
» ZLIB Compressed Data Format Specification (RFC 1950)

gzeof> <gzdeflate
[edit] Last updated: Sat, 17 Nov 2012

热心网友 时间:2023-10-26 12:12

在java中用Inflater.setInput()输入PHP传来的码文,用Inflater.inflate()解压出原文. 再用new String(原文, "GBK");转换成java字符串。

热心网友 时间:2023-10-26 12:12

gzencode

(PHP 4 >= 4.0.4, PHP 5)

gzencode — Create a gzip compressed string

说明
string gzencode ( string $data [, int $level = -1 [, int $encoding_mode = FORCE_GZIP ]] )
This function returns a compressed version of the input data compatible with the output of the gzip program.

For more information on the GZIP file format, see the document: » GZIP file format specification version 4.3 (RFC 1952).

参数
data
The data to encode.

level
The level of compression. Can be given as 0 for no compression up to 9 for maximum compression. If not given, the default compression level will be the default compression level of the zlib library.

encoding_mode
The encoding mode. Can be FORCE_GZIP (the default) or FORCE_DEFLATE.

Prior to PHP 5.4.0, using FORCE_DEFLATE results in a standard zlib deflated string (inclusive zlib headers) after a gzip file header but without the trailing crc32 checksum.

In PHP 5.4.0 and later, FORCE_DEFLATE generates RFC 1950 compliant output, consisting of a zlib header, the deflated data, and an Adler checksum.

返回值
The encoded string, or FALSE if an error occurred.

更新日志
版本说明
5.4.0FORCE_DEFLATE now generates RFC 1950 compliant output.
4.2.0The encoding_mode parameter was added
范例
The resulting data contains the appropriate headers and data structure to make a standard .gz file, e.g.:

Example #1 Creating a gzip file

<?php
$data = implode("", file("bigfile.txt"));
$gzdata = gzencode($data, 9);
$fp = fopen("bigfile.txt.gz", "w");
fwrite($fp, $gzdata);
fclose($fp);
?>
参见
gzdecode() - Decodes a gzip compressed string
gzdeflate() - Deflate a string
gzinflate() - Inflate a deflated string
gzuncompress() - Uncompress a compressed string
gzcompress() - Compress a string
» ZLIB Compressed Data Format Specification (RFC 1950)

gzeof> <gzdeflate
[edit] Last updated: Sat, 17 Nov 2012

热心网友 时间:2023-10-26 12:12

在java中用Inflater.setInput()输入PHP传来的码文,用Inflater.inflate()解压出原文. 再用new String(原文, "GBK");转换成java字符串。

热心网友 时间:2023-10-26 12:13

he data to encode.
level
The level of compression. Can be given as 0 for no compression up to 9 for maximum compression. If not given, the default compression level will be the default compression level of the zlib library.
encoding_mode
The encoding mode. Can be FORCE_GZIP (the default) or FORCE_DEFLATE.
Prior to PHP 5.4.0, using FORCE_DEFLATE results in a standard zlib deflated string (inclusive zlib headers) after a gzip file header but without the trailing crc32 checksum.
In PHP 5.4.0 and later, FORCE_DEFLATE generates RFC 1950 compliant output, consisting of a zlib header, the deflated data, and an Adler checksum.

热心网友 时间:2023-10-26 12:13

he data to encode.
level
The level of compression. Can be given as 0 for no compression up to 9 for maximum compression. If not given, the default compression level will be the default compression level of the zlib library.
encoding_mode
The encoding mode. Can be FORCE_GZIP (the default) or FORCE_DEFLATE.
Prior to PHP 5.4.0, using FORCE_DEFLATE results in a standard zlib deflated string (inclusive zlib headers) after a gzip file header but without the trailing crc32 checksum.
In PHP 5.4.0 and later, FORCE_DEFLATE generates RFC 1950 compliant output, consisting of a zlib header, the deflated data, and an Adler checksum.

热心网友 时间:2023-10-26 12:13

he data to encode.
level
The level of compression. Can be given as 0 for no compression up to 9 for maximum compression. If not given, the default compression level will be the default compression level of the zlib library.
encoding_mode
The encoding mode. Can be FORCE_GZIP (the default) or FORCE_DEFLATE.
Prior to PHP 5.4.0, using FORCE_DEFLATE results in a standard zlib deflated string (inclusive zlib headers) after a gzip file header but without the trailing crc32 checksum.
In PHP 5.4.0 and later, FORCE_DEFLATE generates RFC 1950 compliant output, consisting of a zlib header, the deflated data, and an Adler checksum.

热心网友 时间:2023-10-26 12:12

gzencode

(PHP 4 >= 4.0.4, PHP 5)

gzencode — Create a gzip compressed string

说明
string gzencode ( string $data [, int $level = -1 [, int $encoding_mode = FORCE_GZIP ]] )
This function returns a compressed version of the input data compatible with the output of the gzip program.

For more information on the GZIP file format, see the document: » GZIP file format specification version 4.3 (RFC 1952).

参数
data
The data to encode.

level
The level of compression. Can be given as 0 for no compression up to 9 for maximum compression. If not given, the default compression level will be the default compression level of the zlib library.

encoding_mode
The encoding mode. Can be FORCE_GZIP (the default) or FORCE_DEFLATE.

Prior to PHP 5.4.0, using FORCE_DEFLATE results in a standard zlib deflated string (inclusive zlib headers) after a gzip file header but without the trailing crc32 checksum.

In PHP 5.4.0 and later, FORCE_DEFLATE generates RFC 1950 compliant output, consisting of a zlib header, the deflated data, and an Adler checksum.

返回值
The encoded string, or FALSE if an error occurred.

更新日志
版本说明
5.4.0FORCE_DEFLATE now generates RFC 1950 compliant output.
4.2.0The encoding_mode parameter was added
范例
The resulting data contains the appropriate headers and data structure to make a standard .gz file, e.g.:

Example #1 Creating a gzip file

<?php
$data = implode("", file("bigfile.txt"));
$gzdata = gzencode($data, 9);
$fp = fopen("bigfile.txt.gz", "w");
fwrite($fp, $gzdata);
fclose($fp);
?>
参见
gzdecode() - Decodes a gzip compressed string
gzdeflate() - Deflate a string
gzinflate() - Inflate a deflated string
gzuncompress() - Uncompress a compressed string
gzcompress() - Compress a string
» ZLIB Compressed Data Format Specification (RFC 1950)

gzeof> <gzdeflate
[edit] Last updated: Sat, 17 Nov 2012

热心网友 时间:2023-10-26 12:13

在java中用Inflater.setInput()输入PHP传来的码文,用Inflater.inflate()解压出原文. 再用new String(原文, "GBK");转换成java字符串。

热心网友 时间:2023-10-26 12:13

he data to encode.
level
The level of compression. Can be given as 0 for no compression up to 9 for maximum compression. If not given, the default compression level will be the default compression level of the zlib library.
encoding_mode
The encoding mode. Can be FORCE_GZIP (the default) or FORCE_DEFLATE.
Prior to PHP 5.4.0, using FORCE_DEFLATE results in a standard zlib deflated string (inclusive zlib headers) after a gzip file header but without the trailing crc32 checksum.
In PHP 5.4.0 and later, FORCE_DEFLATE generates RFC 1950 compliant output, consisting of a zlib header, the deflated data, and an Adler checksum.
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
圣斗士星矢正义传说攻略_圣斗士星矢正义传说新手攻略 圣斗士星矢正义传说怎么觉醒圣衣 圣衣玩法攻略 圣斗士星矢正义传说召唤石怎么获得 获取攻略一览 超市促销员手机上打卡迟到几分钟 在超市里打卡显示的公司是什么意思? 长鹿休闲度假农庄交通指南 求从容桂到长鹿农庄怎么坐车,详细,准确 形容神情的五字词语 女生内衣穿多久该扔掉 吴江离张家港有多远? php横向重复区域代码问题 怎样用PHP逐行读取数G的大文件最有效率且不会搞爆内存 php函数如何返回数组啊, 比如, 关于php的问题 php urlencode 特殊字符 php怎么用啊?我是初学者(环境搭建好了) 一个php编程问题:假设abcdefghij十个字母分别代表0123456789十个数字... php最大能传多大的文件 PHP如何连接GBASE数据库 关于php无法用localhost访问的原因. phpcgi进程占用cpu资源过多负载高的原因都有哪些 北京通州区金融街园中园改燃气管道得花多少钱 现代金融的核心功能是什么 睿银控股集团有限公司怎么样? 多伦多证券交易所上市的服务机构国内有哪些 互联网金融将会有何发展趋势 我想了解1998年2月17日出生的水瓶座女孩的性格特点,优点、缺点分明 梦见天上来了一根管道通进了我家? 美元升值对美国经济的影响? 为什么近期美元升值? 当陷入抑郁情绪的时候,你认为该如何“自救”? 如何摆脱抑郁情绪? 如何摆脱抑郁情绪 怎样让自己快乐起来摆脱抑郁 怎样克服抑郁情绪 怎样才能走出抑郁 怎么克服抑郁情绪走出痛苦 如何摆脱忧郁情绪? 抑郁到底是怎么形成的,怎么样才可以摆脱掉抑郁? 怎么样摆脱抑郁的情绪 如何摆脱抑郁症? 在生活中,怎样才能摆脱害怕、愤怒和抑郁的情绪? 你是如何排解自己的抑郁情绪的? 如何摆脱内心忧郁的情绪? 动画不是有好几种的嘛?比如CG动画,3D动画,,,就是问一下,有多少种?怎么分别? 除了《飞天小女警》,在你的童年记忆里还有什么好看的动画片? 有哪些经典动画片比如象犬夜叉之类的 80后90初的童年回忆有哪些啊?比如动画片,玩的游戏,吃的等等越全越好哦! 动漫的共性是什么? 动漫创作专业的前景怎么样?