MCPcopy Index your code
hub / github.com/HelloZeroNet/ZeroNet / read

Method read

plugins/Sidebar/ZipStream.py:22–32  ·  view source on GitHub ↗
(self, size=60 * 1024)

Source from the content-addressed store, hash-verified

20 self.zf.close()
21
22 def read(self, size=60 * 1024):
23 for file_path, relative_path in self.file_list:
24 self.zf.write(file_path, relative_path)
25 if self.buff.tell() >= size:
26 break
27 self.buff.seek(0)
28 back = self.buff.read()
29 self.buff.truncate(0)
30 self.buff.seek(0)
31 self.buff_pos += len(back)
32 return back
33
34 def write(self, data):
35 self.pos += len(data)

Callers 15

streamZipMethod · 0.95
announceTrackerHttpMethod · 0.45
actionUiMediaMethod · 0.45
testMemorySaveMethod · 0.45
loadMethod · 0.45
resolveDomainMethod · 0.45
isAutorunEnabledMethod · 0.45
actionLoginMethod · 0.45
processNameOpFunction · 0.45
actionBenchmarkMethod · 0.45

Calls 3

writeMethod · 0.45
tellMethod · 0.45
seekMethod · 0.45

Tested by 1

testMemorySaveMethod · 0.36