func (a *archive50) next() (*fileBlockHeader, error) {
	for {
		h, err := a.readBlockHeader()
		if err != nil {
			return nil, err
		}
		a.byteReader = limitByteReader(a.v, h.dataSize)
		switch h.htype {
		case block5File:
			return a.parseFileHeader(h)
		case block5Arc:
			flags := h.data.uvarint()
			a.multi = flags&arc5MultiVol > 0
			a.solid = flags&arc5Solid > 0
		case block5Encrypt:
			err = a.parseEncryptionBlock(h.data)
		case block5End:
			flags := h.data.uvarint()
			if flags&endArc5NotLast == 0 || !a.multi {
				return nil, errArchiveEnd
			}
			return nil, errArchiveContinues
		default:
			// discard block data
			_, err = io.Copy(ioutil.Discard, a.byteReader)
		}
		if err != nil {
			return nil, err
		}
	}
}
func (a *archive50) next() (*fileBlockHeader, error) {
	for {
		h, err := a.readBlockHeader()
		if err != nil {
			return nil, err
		}
		a.byteReader = limitByteReader(a.v, h.dataSize)
		switch h.htype {
		case block5File:
			return a.parseFileHeader(h)
		case block5Arc:
			flags := h.data.uvarint()
			a.multi = flags&arc5MultiVol > 0
			a.solid = flags&arc5Solid > 0
		case block5Encrypt:
			err = a.parseEncryptionBlock(h.data)
		case block5End:
			flags := h.data.uvarint()
			if flags&endArc5NotLast == 0 || !a.multi {
				return nil, errArchiveEnd
			}
			return nil, errArchiveContinues
		default:
			
			_, err = io.Copy(ioutil.Discard, a.byteReader)
		}
		if err != nil {
			return nil, err
		}
	}
}
func ( a * archive50 ) next ( ) ( * fileBlockHeader , error ) { for { h , err := a . readBlockHeader ( ) if err != nil { return nil , err } a . byteReader = limitByteReader ( a . v , h . dataSize ) switch h . htype { case block5File : return a . parseFileHeader ( h ) case block5Arc : flags := h . data . uvarint ( ) a . multi = flags & arc5MultiVol > 0 a . solid = flags & arc5Solid > 0 case block5Encrypt : err = a . parseEncryptionBlock ( h . data ) case block5End : flags := h . data . uvarint ( ) if flags & endArc5NotLast == 0 || ! a . multi { return nil , errArchiveEnd } return nil , errArchiveContinues default : // discard block data _ , err = io . Copy ( ioutil . Discard , a . byteReader ) } if err != nil { return nil , err } } }
// next advances to the next file block in the archive
next advances to the next file block in the archive