MCPcopy Index your code
hub / github.com/python/cpython / read

Method read

Lib/compression/zstd/_zstdfile.py:164–173  ·  view source on GitHub ↗

Read up to size uncompressed bytes from the file. If size is negative or omitted, read until EOF is reached. Returns b'' if the file is already at EOF.

(self, size=-1)

Source from the content-addressed store, hash-verified

162 self._fp.flush()
163
164 def read(self, size=-1):
165 """Read up to size uncompressed bytes from the file.
166
167 If size is negative or omitted, read until EOF is reached.
168 Returns b'' if the file is already at EOF.
169 """
170 if size is None:
171 size = -1
172 self._check_can_read()
173 return self._buffer.read(size)
174
175 def read1(self, size=-1):
176 """Read up to size uncompressed bytes, while trying to avoid

Callers 12

test_closedMethod · 0.95
test_seekableMethod · 0.95
test_readableMethod · 0.95
test_writableMethod · 0.95
_load_libraryMethod · 0.45
_is_wasmFunction · 0.45
_is_elfFunction · 0.45
_findLib_gccFunction · 0.45
_get_sonameFunction · 0.45
find_libraryFunction · 0.45
_findSoname_ldconfigFunction · 0.45

Calls 1

_check_can_readMethod · 0.80

Tested by 5

test_closedMethod · 0.76
test_seekableMethod · 0.76
test_readableMethod · 0.76
test_writableMethod · 0.76