diff options
author | itsme <itsme@xs4all.nl> | 2021-07-09 19:57:22 +0200 |
---|---|---|
committer | itsme <itsme@xs4all.nl> | 2021-07-09 19:57:22 +0200 |
commit | c0f52451db3eff406205af05a7eb81ab10ebaf36 (patch) | |
tree | e969438315430f74d5a6a7ab0f8767bc5dc55c75 | |
parent | 8f24b1280b8b9d8414dda3b65c14b43c6c2c2704 (diff) |
readers: added 'readlongstring'
-rw-r--r-- | readers.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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') |