dtorop932 at hotmail dot com's comments, according to my tests, is incorrect. That code wishes to download the entire file before parsing, which is inconvinient. The wget method works though.
![]() |
|
||||||||||
|
gzopenОписаниеresource gzopen ( string filename, string mode [, int use_include_path] )Открывает файл gzip (.gz) для чтение или записи. gzopen() также можно использовать для несжатых файлов (т.е. не в формате gzip); в этом случае gzread() вернёт файл напрямую, без какой-либо обработки. Список параметров
Возвращаемые значенияВозвращает указатель на открытый файл, после чего всё, что вы читаете из этого дескриптора, будет автоматически распаковываться, а всё, что вы записываете - упаковываться. В случае ошибки функция возвращает FALSE. gzopen
rob at digital-crocus dot com
01-Jun-2005 05:28
dtorop932 at hotmail dot com's comments, according to my tests, is incorrect. That code wishes to download the entire file before parsing, which is inconvinient. The wget method works though.
pentek_imre at mailbox dot hu
29-Jan-2005 10:36
Be aware that when opening a remote file on a http server the gzopen will return by default false after 120 seconds waiting to any answer.
dtorop932 at hotmail dot com
21-Oct-2004 12:04
RE dubious's comment: "Being able to read gzip streams from ftp and http is near the top of my personal wishlist at the moment..."
-delete-this-part-dubious at 2xtreme dot net
02-Jan-2002 07:22
"On the fly" gunzipping actually DOES seem to work - it just appears that only LOCAL streams/files (including php://stdin) can be accessed for some reason. I THINK (but have not yet tested) that you could similarly gzopen "php://stdout" and pass a stream of gzipped data to the browser (when run from a web page) or console (when run standalone) through there. |