public function write(Tag $tag)
 {
     \tool::fprint("Writing ... " . get_called_class() . "@{$this->file->ftell()}");
     $tmp = new SplFileObject('php://memory', 'wb+');
     $tag->save($tmp);
     $pos = $tmp->ftell();
     $tmp->fseek(0);
     return $this->file->fwrite(gzencode($tmp->fread($pos), 9, FORCE_GZIP));
 }
示例#2
0
 public function write(Tag $tag)
 {
     \tool::fprint("Writing ... " . get_called_class() . "@{$this->file->ftell()}");
     return $tag->save($this->file);
 }
示例#3
0
 public function save(SplFileObject $file)
 {
     return parent::save($file) + $file->fwrite(static::store($this->value));
 }