I'm attempting to compress an Excel BytesIO stream into a ZIP BytesIO stream, but using the write command results in ValueError: stat: embedded null character in the path being called (). Both pyzipper and pyminizip that I tried didn't perform well.
def __compress_excel__(self, excel_buffer):
zip_buffer = BytesIO()
password = b'password'
zip_buffer = pyzipper.AESZipFile(zip_stream, mode='w')
zip_buffer.setpassword(password)
zip_buffer.write(excel_buffer.getvalue())
return zip_buffer.getvalue()
Can someone please help me with this?