summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoritsme <itsme@xs4all.nl>2021-07-09 19:57:22 +0200
committeritsme <itsme@xs4all.nl>2021-07-09 19:57:22 +0200
commitc0f52451db3eff406205af05a7eb81ab10ebaf36 (patch)
treee969438315430f74d5a6a7ab0f8767bc5dc55c75
parent8f24b1280b8b9d8414dda3b65c14b43c6c2c2704 (diff)
readers: added 'readlongstring'
-rw-r--r--readers.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/readers.py b/readers.py
index 028f5c4..74ee0a8 100644
--- a/readers.py
+++ b/readers.py
@@ -24,6 +24,10 @@ class ByteReader:
24 self.o += n 24 self.o += n
25 return self.data[self.o-n:self.o] 25 return self.data[self.o-n:self.o]
26 26
27 def readlongstring(self):
28 namelen = self.readdword()
29 return self.readbytes(namelen).decode('cp1251')
30
27 def readname(self): 31 def readname(self):
28 namelen = self.readbyte() 32 namelen = self.readbyte()
29 return self.readbytes(namelen).decode('cp1251') 33 return self.readbytes(namelen).decode('cp1251')