Added pynbt in order to decompress and read nbt data into a more friendly format

This commit is contained in:
Ammar Askar committed 2012-11-03 19:08:39 +05:00
1 parent 5cd8554908
commit 7d50e325ba
5 files changed
+382 -2

No files matched your search

+5
View File
@@ -129,12 +129,17 @@ class EncryptedFileObjectHandler():
def __init__(self, fileobject, cipher):
self.fileobject = fileobject
self.cipher = cipher
self.length = 0
def read(self, length):
rawData = self.fileobject.read(length)
self.length += length
unencryptedData = self.cipher.decrypt(rawData)
return unencryptedData
def tell(self):
return self.length
class EncryptedSocketObjectHandler():
def __init__(self, socket, cipher):