{"version":"1.0","type":"rich","title":"encryption-stream","description":"This example demonstrates a file-processing pipeline that compresses and encrypts a plain-text document, then reverses the process. It shows how Node.js streams chain together to transform data through successive stages: reading a file, compressing it with zlib's createGzip, encrypting it with crypto's createCipher using AES-256, and writing the result. A companion script decrypts the file by piping it through createDecipher and createGunzip, then outputs the restored text. The code uses the built-in `fs`, `zlib`, and `crypto` modules with the pipe method.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-009aea2a13d177424dee?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}