PHP: gzdeflate - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

gzencode gzcompress

Last updated: Fri, 26 Jan 2007

view this page in

# gzdeflate

(PHP 4 >= 4.0.4, PHP 5)

gzdeflate -- Сжимает строку

## Описание

string gzdeflate ( string data [, int level] )

Сжимает строку используя формат данных `DEFLATE`.

Для подробностей по алгоритму сжатия DEFLATE, см. "DEFLATE Compressed Data Format Specification 1.3" (RFC 1951).

## Список параметров

`data`

  Данные для сжатия.

`level`

  Уровень сжатия. 0 - без сжатия, 9 - максимум. Если не указан, будет использоваться уровень сжатия по умолчанию библиотеки zlib.

## Возвращаемые значения

Сжатая строка или `FALSE` в случае ошибки.

## Смотрите также

gzinflate()
gzcompress()
gzuncompress()
gzencode()

add a note User Contributed Notes
gzdeflate
giunta dot gaetano at sea-aeroportimilano dot it
21-Aug-2006 05:22
`Take care that that "PHP deflate" != "HTTP deflate".
The deflate encoding used in HTTP is actually zlib encoded.
This is what PHP functions return:
gzencode() == gzip
gzcompress() == zlib (aka. HTTP deflate)
gzdeflate() == *raw* deflate encoding`
denis dot noessler at red-at dot de
17-Jun-2003 03:26
`if you have compressed data which is greater than 2 MB (system dependent), you will receive a buffer error by calling the function gzinflate().
be sure to to compress your data by a lower compression level, like 1.
i.e.: gzdeflate($sData, 1);`
add a note
gzencode gzcompress

Last updated: Fri, 26 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 10:36:09 2007 PST