I have a Java program that opens a socket connection to a server that streams Zip compressed data. I read(bytebuffer) from the stream, setInput(bytebuffer) on the zip object, and inflate(outputbuffer) to get my uncompressed data.
What would be the equivalent in python?
Here is the java code:
byte[] compressedBytes = new byte[1024];
int bytesRead = inputStream.read(compressedBytes);
zip.setInput(compressedBytes, 0, bytesRead);
zip.inflate(uncompressedBytes, 0, 1024);
Or, to summarize, I need a streaming inflate (not file based) zip option for python.