new_from_stream (Gem::Package::TarHeader)

    # File lib/rubygems/package.rb, line 68
        def self.new_from_stream(stream)
          data = stream.read(512)
          fields = data.unpack("A100" +   # record name
                               "A8A8A8" + # mode, uid, gid
                               "A12A12" + # size, mtime
                               "A8A" +    # checksum, typeflag
                               "A100" +   # linkname
                               "A6A2" +   # magic, version
                               "A32" +    # uname
                               "A32" +    # gname
                               "A8A8" +   # devmajor, devminor
                               "A155")    # prefix
          name = fields.shift
          mode = fields.shift.oct
          uid = fields.shift.oct
          gid = fields.shift.oct
          size = fields.shift.oct
          mtime = fields.shift.oct
          checksum = fields.shift.oct
          typeflag = fields.shift
          linkname = fields.shift
          magic = fields.shift
          version = fields.shift.oct
          uname = fields.shift
          gname = fields.shift
          devmajor = fields.shift.oct
          devminor = fields.shift.oct
          prefix = fields.shift

          empty = (data == "\0" * 512)

          new(:name=>name, :mode=>mode, :uid=>uid, :gid=>gid, :size=>size,
              :mtime=>mtime, :checksum=>checksum, :typeflag=>typeflag,
              :magic=>magic, :version=>version, :uname=>uname, :gname=>gname,
              :devmajor=>devmajor, :devminor=>devminor, :prefix=>prefix,
              :empty => empty )
        end