pike.git / src / modules / Gz / module.pmod.in

version» Context lines:

pike.git/src/modules/Gz/module.pmod.in:1: - // $Id: module.pmod.in,v 1.7 2002/11/25 14:52:40 grubba Exp $ + // $Id: module.pmod.in,v 1.8 2002/11/25 15:47:34 grubba Exp $   #pike __REAL_VERSION__      inherit @module@;      #if constant(@module@._file)      //! Allows the user to open a Gzip archive and read and write   //! it's contents in an uncompressed form, emulating the @[Stdio.File]   //! interface.   //! @note
pike.git/src/modules/Gz/module.pmod.in:91:    //! If no argument is given, the whole file is read.    int|string read(void|int length) {    if (!is_open) {    return 0;    }       if (!zero_type(length))    return ::read(length);       String.Buffer buf = String.Buffer(); -  do { +     string data; -  +  do {    if (!(data = ::read(1024*64))) break;    buf->add(data);    } while (sizeof(data));    return (string)buf;    }   }      #endif /* constant(@module@._file) */