Forum Webscript.Ru

Программирование => PHP => Тема начата: Lion от 12 Февраля 2002, 17:55:21

Название: Алгоритм сжатия
Отправлено: Lion от 12 Февраля 2002, 17:55:21
Кто-нибудь знает как можно реализовать используя php сжатие (а потом расжатие) текстового документа, хотя бы процентов на 10-30 ?
Название: Алгоритм сжатия
Отправлено: Stek от 12 Февраля 2002, 18:02:34
CVIII. Zlib Compression Functions
This module uses the functions of zlib by Jean-loup Gailly and Mark Adler to transparently read and write gzip (.gz) compressed files. You have to use a zlib version >= 1.0.9 with this module.

This module contains versions of most of the filesystem functions which work with gzip-compressed files (and uncompressed files, too, but not with sockets).

Note: The current CVS version 4.0.4-dev introduces a fopen-wrapper for .gz-files, so that you can use a special \'zlib:\' URL to access compressed files transparently using the normal f*() file access functions if you prepend the filename or path with a \'zlib:\' prefix when calling fopen().

This feature requires a C runtime library that provides the fopencookie() function. To my current knowledge the GNU libc is the only library that provides this feature.
Название: Алгоритм сжатия
Отправлено: Dm от 12 Февраля 2002, 19:16:44
Главное, чтобы пхп был скомпилирован с zlib\'ом.
А если win - просто подключенный модуль (в php.ini).
Название: ZIP File Maker
Отправлено: Макс от 12 Февраля 2002, 22:06:03
http://www.zend.com/codex.php?id=696&single=1
Название: Алгоритм сжатия
Отправлено: Lion от 14 Февраля 2002, 22:37:49
А есть что-нибудь простенькое, что бы даже на бесплатном хостинге без проблем работало ?
Название: Алгоритм сжатия
Отправлено: Dm от 14 Февраля 2002, 23:53:54
Ведь можно найти бесплатный хостинг с zlib\'ом, к примеру, flashmaster.ru
См. phpinfo(); - если там это есть, то отлично :)