kopia lustrzana https://github.com/micropython/micropython-lib
upip: upip_utarfile.skip(): Optimize for memory usage.
rodzic
2696367cda
commit
2ca1527321
|
@ -39,7 +39,13 @@ class FileSection:
|
|||
return sz
|
||||
|
||||
def skip(self):
|
||||
self.f.read(self.content_len + self.align)
|
||||
sz = self.content_len + self.align
|
||||
if sz:
|
||||
buf = bytearray(16)
|
||||
while sz:
|
||||
s = min(sz, 16)
|
||||
self.f.readinto(buf, s)
|
||||
sz -= s
|
||||
|
||||
class TarInfo:
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue