Lines Matching refs:size
157 def read(self, size=-1):
158 """Read up to size uncompressed bytes from the file.
160 If size is negative or omitted, read until EOF is reached.
164 return self._buffer.read(size)
166 def read1(self, size=-1):
167 """Read up to size uncompressed bytes, while trying to avoid
169 buffer's worth of data if size is negative.
174 if size < 0:
175 size = io.DEFAULT_BUFFER_SIZE
176 return self._buffer.read1(size)
186 def readline(self, size=-1):
189 The terminating newline (if present) is retained. If size is
190 non-negative, no more than size bytes will be read (in which
193 if not isinstance(size, int):
194 if not hasattr(size, "__index__"):
196 size = size.__index__()
198 return self._buffer.readline(size)
200 def readlines(self, size=-1):
203 size can be specified to control the number of lines read: no
204 further lines will be read once the total size of the lines read
205 so far equals or exceeds size.
207 if not isinstance(size, int):
208 if not hasattr(size, "__index__"):
210 size = size.__index__()
212 return self._buffer.readlines(size)