Exemplo n.º 1
0
def compressor(data):
    stream = StreamParser(data)
    chunks = []
    header = StreamWriter()

    # chunkify the data into chunks of 0x20000 bytes
    while (chunk := stream.read(0x20000)):
        chunks.append(chunk)
Exemplo n.º 2
0
 def load(self, path):
     stream = StreamParser(open(path, "rb").read())
     self.header.load(
         stream)  # if stream passed instead of path, stream will be used
     self.pixelData = stream.read()  # read pixel data