public static function readFrom(Reader $file, TAG_Array $into = null) { $self = $into ?: new static(); $type = $self->type = Dictionary::mapType($file->fread(1)); $size = TAG_Int::readFrom($file); if (\tool::debug()) { \tool::fprint("Reading {$size} elements of type {$self->type}"); } for ($i = 0; $i < $size; $i++) { $self[] = $type::readFrom($file); } return $self; }
public static function readFrom(Reader $file) { \tool::fprint("Reading ... " . get_called_class()); return (string) $file->fread(TAG_Short::readFrom($file)); }
public static function readFrom(Reader $file) { \tool::fprint("Reading ... " . get_called_class() . "::" . __FUNCTION__); return Reader::convert('d', $file->fread(8)); }