Probably most of us heard about streams in PHP. They are background of all files and network operations in PHP, even if we don’t see it. Everytime when you use file_get_contetnts or fopen you are actually using streams. But there are many stream wrappers I haven’t used, because they aren’t well known.One of them is compress.zlib (and two other compression stream filters). With this one, you can decompress .gz archive under the hood of the fread or file_get_contents calls. On the listing below, you can find how streams are powerfull, in three lines I’ve done something which „writing by hand ” will be done in at least 30 🙂