Lines Matching refs:size
70 func NewReader(r io.ReaderAt, size int64) (*Reader, error) {
72 if err := zr.init(r, size); err != nil {
78 func (z *Reader) init(r io.ReaderAt, size int64) error {
79 end, err := readDirectoryEnd(r, size)
83 if end.directoryRecords > uint64(size)/fileHeaderLen {
84 ….Errorf("archive/zip: TOC declares impossible %d files in %d byte zip", end.directoryRecords, size)
89 rs := io.NewSectionReader(r, 0, size)
100 f := &File{zip: z, zipr: r, zipsize: size}
161 size := int64(f.CompressedSize64)
162 r := io.NewSectionReader(f.zipr, f.headerOffset+bodyOffset, size)
170 desr = io.NewSectionReader(f.zipr, f.headerOffset+bodyOffset+size, dataDescriptorLen)
294 size := b.uint16()
295 if int(size) > len(b) {
303 eb := readBuf(b[:size])
328 b = b[size:]
389 func readDirectoryEnd(r io.ReaderAt, size int64) (dir *directoryEnd, err error) {
394 if bLen > size {
395 bLen = size
398 if _, err := r.ReadAt(buf, size-bLen); err != nil && err != io.EOF {
403 directoryEndOffset = size - bLen + int64(p)
406 if i == 1 || bLen == size {
439 if o := int64(d.directoryOffset); o < 0 || o >= size {