From c0f52451db3eff406205af05a7eb81ab10ebaf36 Mon Sep 17 00:00:00 2001 From: itsme Date: Fri, 9 Jul 2021 19:57:22 +0200 Subject: readers: added 'readlongstring' --- readers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/readers.py b/readers.py index 028f5c4..74ee0a8 100644 --- a/readers.py +++ b/readers.py @@ -24,6 +24,10 @@ class ByteReader: self.o += n return self.data[self.o-n:self.o] + def readlongstring(self): + namelen = self.readdword() + return self.readbytes(namelen).decode('cp1251') + def readname(self): namelen = self.readbyte() return self.readbytes(namelen).decode('cp1251') -- cgit v1.2.3