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.12 2003/04/15 13:45:23 marcus Exp $ + // $Id: module.pmod.in,v 1.13 2003/04/15 13:53:16 marcus Exp $   #pike __REAL_VERSION__      inherit @module@;      //! Low-level implementation of read/write support for GZip files   class _file {       static private Stdio.Stream f;    static private inflate inf;    static private deflate def;
pike.git/src/modules/Gz/module.pmod.in:85:    write_mode = 1;    if(n >= '0' && n <= '9')    level = n - '0';    else if(n == 'f')    strategy = FILTERED;    else if(n == 'h')    strategy = HUFFMAN_ONLY;    else    return 1;    }); -  if(write_mode) { -  if(!has_value(mode, 'a')) -  mode += "t"; -  mode += "c"; +  if(write_mode) +  mode += "c"+(has_value(mode, 'a')? "w":"t");    } -  } +     file_pos = 0;    crc = crc32("");    if(objectp(file))    f = file;    else {    f = Stdio.File();    if(!f->open(file, mode||"rb"))    return 0;    }    return write_mode? make_header() : check_header();