Run ❯
Get your
own Python
server
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Go to Spaces
Ctrl+Alt+P
import zlib text = b'Hello Tobias! This is a message to compress.' compressed = zlib.compress(text) decompressed = zlib.decompress(compressed) print(f'Original size: {len(text)} bytes') print(f'Compressed size: {len(compressed)} bytes') print(f'Decompressed: {decompressed.decode()}')
Original size: 44 bytes
Compressed size: 49 bytes
Decompressed: Hello Tobias! This is a message to compress.